diff options
author | Joey Pan <joey.pan@mediatek.com> | 2014-06-12 09:08:26 +0800 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2014-06-30 23:28:07 +0000 |
commit | b5a8e44648685070f146ff8456d36013c502f7a1 (patch) | |
tree | b32569e6430a2e093c824da2e2232eb643217341 | |
parent | 63317bdfd17684345b041e689b332abdd87d48e1 (diff) | |
download | android_external_giflib-staging/cm-12.0.tar.gz android_external_giflib-staging/cm-12.0.tar.bz2 android_external_giflib-staging/cm-12.0.zip |
handle no content comment block in the gif.staging/cm-12.0-cafstaging/cm-12.0
Change-Id: I3c87a151b0d0f487865c4f84d26101797bc91290
Signed-off-by: Joey Pan <joey.pan@mediatek.com>
(cherry picked from commit 7ee131f83daab0744dbbfbbf2f375c05a5285f2e)
-rw-r--r-- | dgif_lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1134,11 +1134,13 @@ DGifSlurp(GifFileType *GifFile) if (DGifGetExtension(GifFile,&ExtFunction,&ExtData) == GIF_ERROR) return (GIF_ERROR); /* Create an extension block with our data */ - if (GifAddExtensionBlock(&GifFile->ExtensionBlockCount, + if (ExtData != NULL) { + if (GifAddExtensionBlock(&GifFile->ExtensionBlockCount, &GifFile->ExtensionBlocks, ExtFunction, ExtData[0], &ExtData[1]) == GIF_ERROR) return (GIF_ERROR); + } while (ExtData != NULL) { if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) return (GIF_ERROR); |