missing arg to open()

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Norm

missing arg to open()

Post by Norm »

Building in the Fedora 8 toolchain I tripped over a weird error which I tracked down to an open() in CopyDelegateFile which specifies O_CREAT, but doesn't include a mode argument in the call.


--- ImageMagick-6.3.5-9/magick/delegate.c 2007-09-11 13:20:41.000000000 +1000
+++ ImageMagick-6.3.5-9/magick/delegate.c 2007-09-18 18:27:31.000000000 +1000
@@ -769,7 +769,8 @@ static void CopyDelegateFile(const char
/*
Copy source file to destination.
*/
- destination_file=open(destination,O_WRONLY | O_BINARY | O_CREAT);
+ destination_file=open(destination,O_WRONLY | O_BINARY | O_CREAT,
+ S_IRUSR | S_IWUSR | S_IRGRP );
if (destination_file == -1)
return;
source_file=open(source,O_RDONLY | O_BINARY);
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: missing arg to open()

Post by magick »

We have a patch for the problem you reported in ImageMagick 6.3.6-0 Beta.
Post Reply