mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 05:49:51 +02:00
libwebp/mux: fix double free
transfer ownership of chunk passed in ChunkSetNth(). prevents freeing the chunk in e.g., MuxImageParse() when a partial assignment (alpha but no image) has occurred. Change-Id: Ia69656b04fdf50f098f3816b54abd4e191248de3
This commit is contained in:
@ -121,7 +121,8 @@ WebPMuxError ChunkAssignData(WebPChunk* chunk, const WebPData* const data,
|
||||
|
||||
// Sets 'chunk' at nth position in the 'chunk_list'.
|
||||
// nth = 0 has the special meaning "last of the list".
|
||||
WebPMuxError ChunkSetNth(const WebPChunk* chunk, WebPChunk** chunk_list,
|
||||
// On success ownership is transferred from 'chunk' to the 'chunk_list'.
|
||||
WebPMuxError ChunkSetNth(WebPChunk* chunk, WebPChunk** chunk_list,
|
||||
uint32_t nth);
|
||||
|
||||
// Releases chunk and returns chunk->next_.
|
||||
|
Reference in New Issue
Block a user