Group :: Archiving/Backup
RPM: sharutils
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: sharutils-4.3.78-alt-tmpfile.patch
Download
Download
--- src/unshar.c.orig 2005-01-23 21:01:31 +0300
+++ src/unshar.c 2005-04-03 04:16:47 +0400
@@ -445,13 +445,15 @@ warranty; not even for MERCHANTABILITY o
}
else
{
+#ifdef __MSDOS__
sprintf (name_buffer, "/tmp/unsh.%05d", (int) getpid ());
unlink (name_buffer);
if (file = fopen (name_buffer, "w+"), !file)
error (EXIT_FAILURE, errno, name_buffer);
-#ifndef __MSDOS__
- unlink (name_buffer); /* will be deleted on fclose */
+#else
+ if (file = tmpfile(), !file)
+ error (EXIT_FAILURE, errno, "tmpfile");
#endif
while (size_read = fread (copy_buffer, 1, sizeof (copy_buffer), stdin),