A bug in pict.c file.
Wang Dataton <[email protected]> Mon, 19 Oct 2009 14:30:03 +0200
| Newsgroups | gmane.comp.video.image-magick.devel |
|---|---|
| Message-ID | <[email protected]> |
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."