28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
diff -pur unzip-5.51/unix/unix.c unzip-5.51-fix/unix/unix.c
|
|
--- unzip-5.51/unix/unix.c 2004-04-12 02:29:58.000000000 +0200
|
|
+++ unzip-5.51-fix/unix/unix.c 2005-04-18 08:54:06.000000000 +0200
|
|
@@ -1002,6 +1002,7 @@ void close_outfile(__G) /* GRR: chang
|
|
ush z_uidgid[2];
|
|
int have_uidgid_flg;
|
|
|
|
+ fchmod(fileno(G.outfile), 0400);
|
|
fclose(G.outfile);
|
|
|
|
/*---------------------------------------------------------------------------
|
|
@@ -1049,10 +1050,13 @@ void close_outfile(__G) /* GRR: chang
|
|
"warning: symbolic link (%s) failed\n",
|
|
FnFilter1(G.filename)));
|
|
free(slnk_entry);
|
|
- fclose(G.outfile);
|
|
+ if (G.outfile)
|
|
+ fclose(G.outfile);
|
|
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 ",
|