You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solution should be using WebPMemoryWriterClear(&writer); instead of free(writer.mem); ,acording to the libwebp 's comment
// The custom writer to be used with WebPMemoryWriter as custom_ptr. Upon// completion, writer.mem and writer.size will hold the coded data.// writer.mem must be freed by calling WebPMemoryWriterClear.WEBP_EXTERNintWebPMemoryWrite(constuint8_t*data, size_tdata_size,
constWebPPicture*picture);
So the solution may be add libwebp.dependency 'libwebp','>= 1.3.2' to libwebp subspec and replace YYCGImageCreateEncodedWebPData's implementation. I will make a PR later today.
libwebp has an important vulnerability called CVE-2023-4863, and it is fixed in 1.3.2 for webp. You can see more datils in WebP 堆缓冲区溢出 安全漏洞
crash stack maybe like:
The solution should be using
WebPMemoryWriterClear(&writer);
instead offree(writer.mem);
,acording to the libwebp 's commentSo the solution may be add
libwebp.dependency 'libwebp','>= 1.3.2'
to libwebp subspec and replace YYCGImageCreateEncodedWebPData's implementation. I will make a PR later today.The text was updated successfully, but these errors were encountered: