unzip/unzip-5.51-link-segv.patch

19 lines
690 B
Diff
Raw Normal View History

--- unzip-5.51/unix/unix.c.mmm 2004-04-12 02:29:58.000000000 +0200
+++ unzip-5.51/unix/unix.c 2005-02-03 14:59:46.280095080 +0100
@@ -1049,10 +1049,13 @@
"warning: symbolic link (%s) failed\n",
FnFilter1(G.filename)));
free(slnk_entry);
- fclose(G.outfile);
+ if (G.outfile)
+ fclose(G.outfile);
2004-12-02 18:05:00 +00:00
return;
}
- fclose(G.outfile); /* close "link" file for good... */
+
+ if (G.outfile)
+ fclose(G.outfile); /* close "link" file for good... */
slnk_entry->target[ucsize] = '\0';
if (QCOND2)
Info(slide, 0, ((char *)slide, "-> %s ",