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
(cherry picked from commit 806f6279ae
)
This commit is contained in:
parent
3d97bb7514
commit
883d41fb40
@ -359,6 +359,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