seanooi / iOS-WebP

Google's WebP image format decoder and encoder for iOS
http://seanooi.github.io/iOS-WebP/
MIT License
857 stars 138 forks source link

Memory crash in free_image_data #16

Closed zakyg closed 9 years ago

zakyg commented 9 years ago

the CGDataProviderCreateWithData call uses a pointer to a WebPDecoderConfig struct on static memory for the info (first) parameter. The free_image_data callback is called after imageWithWebPData ends and the WebPDecoderConfig goes out of scope and becomes invalid. The callback attempts to release the invalid struct and crashes the application. This issue is addressed in https://github.com/imojiengineering/iOS-WebP/commit/aa4cffa97e586e6c28d9acfb6b13e64a621dc719.

wangkun611 commented 9 years ago

please create pull request

lvyile commented 8 years ago

thx..... I used Release 0.4, I debug for this issue hours.... somehow, I found this fix... maybe, we can release 0.5 ...