tempfile.c patch for latest snapshot

Bob Friesenhahn <[email protected]> Thu, 3 Apr 2003 08:48:21 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.announce
Message-ID <Pine.GSO.4.44.0304030844270.14826-100000@scooby.simplesystems.org>
It turns out that there is a bug with the temporary filename generator
that becomes apparent under Linux.  Thanks to Juergen Salk for
noticing and reporting this problem.

The last two snapshot packages may by fixed applying the following
patch:

Index: tempfile.c
===================================================================
RCS file: /GraphicsMagick/ImageMagick/magick/tempfile.c,v
retrieving revision 1.6
diff -u -r1.6 tempfile.c
--- tempfile.c	3 Apr 2003 01:48:09 -0000	1.6
+++ tempfile.c	3 Apr 2003 14:37:43 -0000
@@ -327,7 +327,7 @@
     if ((tmpnam(fname) == fname))
       {
         (void) remove(fname);
-        fd=open(fname,O_WRONLY | O_CREAT | O_BINARY | O_EXCL, S_MODE);
+        fd=open(fname,O_RDWR | O_CREAT | O_BINARY | O_EXCL, S_MODE);
         if (fd != -1)
           {
             (void) strncpy(filename,fname,MaxTextExtent-1);

======================================
Bob Friesenhahn
[email protected]
http://www.simplesystems.org/users/bfriesen




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/