patch-2.5.4 mktemp fix

Robert Connolly cendres at videotron.ca
Mon Jan 26 10:55:17 PST 2004


I think this is why patch uses mktemp.

http://mail.gnu.org/archive/html/bug-gnu-utils/2003-04/msg00058.html
/* It is OK to use mktemp here, since the rest of the code always
     opens temp files with O_EXCL.  It might be better to use mkstemp
     to avoid some DoS problems, but simply substituting mkstemp for
     mktemp here will not fix the DoS problems; a more extensive
     change would be needed.  */

And this bug can be reproduced with bfbtester. It looks like bad options 
causes a segfault.
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=62981

--- patch-2.5.4/error.c.program_name    Tue Apr  9 14:38:27 2002
+++ patch-2.5.4/error.c Tue Apr  9 14:38:43 2002
@@ -80,7 +80,7 @@

 /* The calling program should define program_name and set it to the
    name of the executing program.  */
-extern char *program_name;
+extern char const program_name[];

 # ifdef HAVE_STRERROR_R
 #  define __strerror_r strerror_r

This program_name bug is fixed in patch-2.5.9




More information about the hlfs-dev mailing list