Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
aaa68295
Commit
aaa68295
authored
Sep 18, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: GIF decoder should append a sub-block to current extension.
parent
880b98bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
5 deletions
+45
-5
ungif.c
dlls/windowscodecs/ungif.c
+45
-5
No files found.
dlls/windowscodecs/ungif.c
View file @
aaa68295
...
...
@@ -222,6 +222,32 @@ AddExtensionBlock(Extensions *New,
return
(
GIF_OK
);
}
static
int
AppendExtensionBlock
(
Extensions
*
New
,
int
Len
,
const
unsigned
char
ExtData
[])
{
ExtensionBlock
*
ep
;
if
(
New
->
ExtensionBlocks
==
NULL
)
return
(
GIF_ERROR
);
ep
=
&
New
->
ExtensionBlocks
[
New
->
ExtensionBlockCount
-
1
];
ep
->
Bytes
=
ungif_realloc
(
ep
->
Bytes
,
ep
->
ByteCount
+
Len
+
1
);
if
(
ep
->
Bytes
==
NULL
)
return
(
GIF_ERROR
);
if
(
ExtData
)
{
ep
->
Bytes
[
ep
->
ByteCount
]
=
Len
;
memcpy
(
ep
->
Bytes
+
ep
->
ByteCount
+
1
,
ExtData
,
Len
);
ep
->
ByteCount
+=
Len
+
1
;
}
return
(
GIF_OK
);
}
static
void
FreeExtension
(
Extensions
*
Extensions
)
{
...
...
@@ -898,16 +924,30 @@ 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
);
while
(
ExtData
!=
NULL
)
{
int
Len
;
GifByteType
*
Data
;
/* Create an extension block with our data */
if
(
AddExtensionBlock
(
Extensions
,
ExtData
[
0
],
&
ExtData
[
1
])
==
GIF_ERROR
)
if
(
DGifGetExtensionNext
(
GifFile
,
&
ExtData
)
==
GIF_ERROR
)
return
(
GIF_ERROR
);
if
(
DGifGetExtensionNext
(
GifFile
,
&
ExtData
)
==
GIF_ERROR
)
if
(
ExtData
)
{
Len
=
ExtData
[
0
];
Data
=
&
ExtData
[
1
];
}
else
{
Len
=
0
;
Data
=
NULL
;
}
if
(
AppendExtensionBlock
(
Extensions
,
Len
,
Data
)
==
GIF_ERROR
)
return
(
GIF_ERROR
);
temp_save
.
Function
=
0
;
}
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment