Page 1 of 1

missing arg to open()

Posted: 2007-09-25T20:12:08-07:00
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);

Re: missing arg to open()

Posted: 2007-09-25T21:06:48-07:00
by magick
We have a patch for the problem you reported in ImageMagick 6.3.6-0 Beta.