zip/zip-3.0-tempfile.patch
OBS User autobuild b5757e8f42 Accepting request 44233 from Archiving
Copy from Archiving/zip based on submit request 44233 from user coolo

OBS-URL: https://build.opensuse.org/request/show/44233
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zip?expand=0&rev=12
2010-07-30 11:00:55 +00:00

17 lines
352 B
Diff

--- fileio.c
+++ fileio.c
@@ -1490,6 +1490,13 @@
strcat(t, "ziXXXXXX"); /* must use lowercase for Linux dos file system */
# if defined(UNIX) && !defined(NO_MKSTEMP)
/* tempname should not be called */
+ {
+ int fd;
+
+ if ((fd = mkstemp(t)) < 0)
+ return NULL;
+ close(fd);
+ }
return t;
# else
return mktemp(t);