windowscodecs: Properly handle empty GIF extension blocks.
This commit is contained in:
parent
f46aa66ca7
commit
7eaff17786
|
@ -932,9 +932,17 @@ DGifSlurp(GifFileType * GifFile) {
|
|||
|
||||
Extensions->Function = Function;
|
||||
|
||||
/* Create an extension block with our data */
|
||||
if (AddExtensionBlock(Extensions, ExtData[0], &ExtData[1]) == GIF_ERROR)
|
||||
return (GIF_ERROR);
|
||||
if (ExtData)
|
||||
{
|
||||
/* Create an extension block with our data */
|
||||
if (AddExtensionBlock(Extensions, ExtData[0], &ExtData[1]) == GIF_ERROR)
|
||||
return (GIF_ERROR);
|
||||
}
|
||||
else /* Empty extension block */
|
||||
{
|
||||
if (AddExtensionBlock(Extensions, 0, NULL) == GIF_ERROR)
|
||||
return (GIF_ERROR);
|
||||
}
|
||||
|
||||
while (ExtData != NULL) {
|
||||
int Len;
|
||||
|
|
Loading…
Reference in New Issue