[Magick-bugs] found segfault in blob.c

Shane Nelson shane at webqualityhost.net
Tue Mar 13 05:59:15 CDT 2007


Hi Folks,

I'm getting a segfault in the function  MagickExport int SyncBlob(Image 
*image).  The segfault doesn't happen every time I run the program, but 
it happens very often.  I traced the problem to the case PipeStream and 
this line returning bad data sometimes:

  if (fileno(image->blob->file) >= 0)

Sometimes this evals to -1 and other times to 1280263007 or similar 
numbers.  To fix my segfault bug I added an extra line after the if 
statement:

  if (fileno(image->blob->file) < 1000000000)

I know this isn't a good fix, but it does solve my problem, so my 
question is....

What is going wrong with the image->blob->file OR the fileno() function 
that returns crazy data instead of -1 like it should be returning??

Shane
    


More information about the Magick-bugs mailing list