mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
gif2webp: fix crash with NULL extension data
DGifGetExtension() may successfully return, but the data pointer should still be validated BUG=webp:310 Change-Id: I6cfe617871fef2fe07887e5f48bb20f7ab7cfb35
This commit is contained in:
parent
68ae5b671f
commit
806f6279ae
@ -360,6 +360,8 @@ int main(int argc, const char *argv[]) {
|
||||
if (DGifGetExtension(gif, &extension, &data) == GIF_ERROR) {
|
||||
goto End;
|
||||
}
|
||||
if (data == NULL) continue;
|
||||
|
||||
switch (extension) {
|
||||
case COMMENT_EXT_FUNC_CODE: {
|
||||
break; // Do nothing for now.
|
||||
|
Loading…
Reference in New Issue
Block a user