Hi

I found there is bug in pict.c file.

Here is the code snippet in the function ReadPICTImage()

unique_file=AcquireUniqueFileResource(read_info->filename);
if (unique_file != -1)
     file=MagickOpenStream(read_info->filename,"wb");

I think the file is not closed after calling the function
AcquireUniqueFileResource(), so MagickOpenStream will fail.


I guess the following code could fix that, but not sure.
unique_file=AcquireUniqueFileResource(read_info->filename);
close(unique_file)
if (unique_file != -1)
     file=MagickOpenStream(read_info->filename,"wb");



Thank you.


Regards,

Chiyu Wang
-- 


Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html>
- "May you live every day of your life."
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to