Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
f5fc28d2
Commit
f5fc28d2
authored
20 years ago
by
Roman Shaposhnik
Browse files
Options
Downloads
Patches
Plain Diff
* fixing a buffer overrun in gif.c
Originally committed as revision 3363 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
668fe04e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavformat/gif.c
+3
-5
3 additions, 5 deletions
libavformat/gif.c
tests/libav.regression.ref
+2
-2
2 additions, 2 deletions
tests/libav.regression.ref
with
5 additions
and
7 deletions
libavformat/gif.c
+
3
−
5
View file @
f5fc28d2
...
...
@@ -252,7 +252,7 @@ static int gif_image_write_image(ByteIOContext *pb,
gif_put_bits_rev
(
&
p
,
9
,
0x0100
);
/* clear code */
for
(
i
=
0
;
i
<
GIF_CHUNKS
;
i
++
)
{
for
(
i
=
(
left
<
GIF_CHUNKS
)
?
left
:
GIF_CHUNKS
;
i
;
i
--
)
{
if
(
pix_fmt
==
PIX_FMT_RGB24
)
{
v
=
gif_clut_index
(
ptr
[
0
],
ptr
[
1
],
ptr
[
2
]);
ptr
+=
3
;
...
...
@@ -276,12 +276,10 @@ static int gif_image_write_image(ByteIOContext *pb,
put_buffer
(
pb
,
p
.
buf
,
pbBufPtr
(
&
p
)
-
p
.
buf
);
/* the actual buffer */
p
.
buf_ptr
=
p
.
buf
;
/* dequeue the bytes off the bitstream */
}
if
(
left
<=
GIF_CHUNKS
)
{
put_byte
(
pb
,
0x00
);
/* end of image block */
}
left
-=
GIF_CHUNKS
;
}
put_byte
(
pb
,
0x00
);
/* end of image block */
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
tests/libav.regression.ref
+
2
−
2
View file @
f5fc28d2
...
...
@@ -37,8 +37,8 @@ b28918de1199e60a7ac235eefacb7d3b *./data/b-libav.dv
0c5fe86621b7377705837f304d4ba1e9 *./data/b-libav.ppm
7603575 ./data/b-libav.ppm
./data/b-libav.ppm CRC=b2bb8e92
1cac531652ea2ff2fb141d5ae992caa8
*./data/b-libav.gif
290
7057
./data/b-libav.gif
88a98269295fbfce7816558ad84e1259
*./data/b-libav.gif
290
6382
./data/b-libav.gif
c39dd19b88f9e0f03a318b51c37edb61 *./data/b-libav.yuv4mpeg
3801810 ./data/b-libav.yuv4mpeg
./data/b-libav%d.pgm CRC=84c09106
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment