Commit 7eaff177 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

windowscodecs: Properly handle empty GIF extension blocks.

parent f46aa66c
......@@ -932,9 +932,17 @@ DGifSlurp(GifFileType * GifFile) {
Extensions->Function = Function;
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment