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:
James Zern 2016-10-07 11:21:18 -07:00
parent 68ae5b671f
commit 806f6279ae

View File

@ -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.