seanooi/iOS-WebP

Memory crash in free_image_data

zakyg opened this issue · 2 comments

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.

please create pull request

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