Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37769723
en ru br
ALT Linux repos
S:4.15.2-alt1
5.0: 4.6.3-alt1.1
4.1: 4.6.3-alt1.1
4.0: 4.6.3-alt1.1
3.0: 4.4-alt1

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


--- 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),
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin