gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Corrupted heap


From: Adam Fedor
Subject: Re: Corrupted heap
Date: Wed, 17 Mar 2010 13:26:02 -0600


On Mar 17, 2010, at 12:34 PM, Vincent Richomme wrote:


/* Return YES if this looks like a JPEG. */
+ (BOOL) _bitmapIsJPEG: (NSData *)imageData
{
 struct jpeg_decompress_struct  cinfo;

... BLABLA ...

// establish return context for error handling
 if (setjmp(jerrMgr.setjmpBuffer))
   {
     gs_jpeg_memory_src_destroy(&cinfo);
     jpeg_destroy_decompress(&cinfo);
     return NO;
   }

... BLABLA ...

  return YES;
}

Are you sure you need to call free here because I suppose &cinfo->src is
not yet valid.

That looks wrong to me as well.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]