Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
53be37e3
Commit
53be37e3
authored
Dec 13, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msrledec: Check for overreads
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
be5db700
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
msrledec.c
libavcodec/msrledec.c
+5
-1
aasc
tests/ref/fate/aasc
+1
-1
No files found.
libavcodec/msrledec.c
View file @
53be37e3
...
...
@@ -140,7 +140,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
output
=
pic
->
data
[
0
]
+
(
avctx
->
height
-
1
)
*
pic
->
linesize
[
0
];
output_end
=
pic
->
data
[
0
]
+
avctx
->
height
*
pic
->
linesize
[
0
];
while
(
src
<
data
+
srcsize
)
{
while
(
src
+
1
<
data
+
srcsize
)
{
p1
=
*
src
++
;
if
(
p1
==
0
)
{
//Escape code
p2
=
*
src
++
;
...
...
@@ -172,6 +172,10 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
src
+=
p2
*
(
depth
>>
3
);
continue
;
}
if
(
data
+
srcsize
-
src
<
p2
*
(
depth
>>
3
)){
av_log
(
avctx
,
AV_LOG_ERROR
,
"Copy beyond input buffer
\n
"
);
return
-
1
;
}
if
((
depth
==
8
)
||
(
depth
==
24
))
{
for
(
i
=
0
;
i
<
p2
*
(
depth
>>
3
);
i
++
)
{
*
output
++
=
*
src
++
;
...
...
tests/ref/fate/aasc
View file @
53be37e3
...
...
@@ -21,4 +21,4 @@
0, 72000, 168000, 0x646fa087
0, 75600, 168000, 0x404450a2
0, 79200, 168000, 0x5214c456
0, 82800, 168000, 0x
e573025c
0, 82800, 168000, 0x
aef602d3
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