Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
47864728
Commit
47864728
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 add header and trailer to extension blocks.
Metadata readers now have access to complete and correctly formatted data stream.
parent
aaa68295
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
gifformat.c
dlls/windowscodecs/gifformat.c
+2
-2
ungif.c
dlls/windowscodecs/ungif.c
+11
-6
No files found.
dlls/windowscodecs/gifformat.c
View file @
47864728
...
...
@@ -857,8 +857,8 @@ static const void *get_GCE_data(GifFrameDecode *This)
for
(
i
=
0
;
i
<
This
->
frame
->
Extensions
.
ExtensionBlockCount
;
i
++
)
{
if
(
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
Function
==
GRAPHICS_EXT_FUNC_CODE
&&
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
ByteCount
==
4
)
return
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
Bytes
;
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
ByteCount
==
8
)
return
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
Bytes
+
3
;
}
return
NULL
;
}
...
...
dlls/windowscodecs/ungif.c
View file @
47864728
...
...
@@ -209,13 +209,18 @@ AddExtensionBlock(Extensions *New,
ep
=
&
New
->
ExtensionBlocks
[
New
->
ExtensionBlockCount
++
];
ep
->
ByteCount
=
Len
;
ep
->
Bytes
=
ungif_alloc
(
ep
->
ByteCount
);
ep
->
ByteCount
=
Len
+
3
;
ep
->
Bytes
=
ungif_alloc
(
ep
->
ByteCount
+
3
);
if
(
ep
->
Bytes
==
NULL
)
return
(
GIF_ERROR
);
/* Extension Header */
ep
->
Bytes
[
0
]
=
0x21
;
ep
->
Bytes
[
1
]
=
New
->
Function
;
ep
->
Bytes
[
2
]
=
Len
;
if
(
ExtData
)
{
memcpy
(
ep
->
Bytes
,
ExtData
,
Len
);
memcpy
(
ep
->
Bytes
+
3
,
ExtData
,
Len
);
ep
->
Function
=
New
->
Function
;
}
...
...
@@ -238,12 +243,12 @@ AppendExtensionBlock(Extensions *New,
if
(
ep
->
Bytes
==
NULL
)
return
(
GIF_ERROR
);
if
(
ExtData
)
{
ep
->
Bytes
[
ep
->
ByteCount
]
=
Len
;
if
(
ExtData
)
memcpy
(
ep
->
Bytes
+
ep
->
ByteCount
+
1
,
ExtData
,
Len
);
ep
->
ByteCount
+=
Len
+
1
;
}
return
(
GIF_OK
);
}
...
...
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