Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
9bd6375d
Commit
9bd6375d
authored
Jan 29, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msrledec: check bounds before constructing a possibly invalid pointer,
CC:libav-stable@libav.org
parent
6a399854
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
msrledec.c
libavcodec/msrledec.c
+2
-2
No files found.
libavcodec/msrledec.c
View file @
9bd6375d
...
...
@@ -144,8 +144,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
if
(
p1
==
0
)
{
//Escape code
p2
=
bytestream2_get_byte
(
gb
);
if
(
p2
==
0
)
{
//End-of-line
output
=
pic
->
data
[
0
]
+
(
--
line
)
*
pic
->
linesize
[
0
];
if
(
line
<
0
)
{
if
(
--
line
<
0
)
{
if
(
bytestream2_get_be16
(
gb
)
==
1
)
{
// end-of-picture
return
0
;
}
else
{
...
...
@@ -155,6 +154,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
return
AVERROR_INVALIDDATA
;
}
}
output
=
pic
->
data
[
0
]
+
line
*
pic
->
linesize
[
0
];
pos
=
0
;
continue
;
}
else
if
(
p2
==
1
)
{
//End-of-picture
...
...
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