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
d71dfc08
Commit
d71dfc08
authored
Aug 29, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/scpr: error out if run length is <= 0
parent
b205635f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
scpr.c
libavcodec/scpr.c
+6
-0
No files found.
libavcodec/scpr.c
View file @
d71dfc08
...
@@ -334,6 +334,8 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
...
@@ -334,6 +334,8 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
ret
=
decode_value
(
s
,
s
->
run_model
[
0
],
256
,
400
,
&
run
);
ret
=
decode_value
(
s
,
s
->
run_model
[
0
],
256
,
400
,
&
run
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
if
(
run
<=
0
)
return
AVERROR_INVALIDDATA
;
clr
=
(
b
<<
16
)
+
(
g
<<
8
)
+
r
;
clr
=
(
b
<<
16
)
+
(
g
<<
8
)
+
r
;
k
+=
run
;
k
+=
run
;
...
@@ -382,6 +384,8 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
...
@@ -382,6 +384,8 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
ret
=
decode_value
(
s
,
s
->
run_model
[
ptype
],
256
,
400
,
&
run
);
ret
=
decode_value
(
s
,
s
->
run_model
[
ptype
],
256
,
400
,
&
run
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
if
(
run
<=
0
)
return
AVERROR_INVALIDDATA
;
switch
(
ptype
)
{
switch
(
ptype
)
{
case
0
:
case
0
:
...
@@ -615,6 +619,8 @@ static int decompress_p(AVCodecContext *avctx,
...
@@ -615,6 +619,8 @@ static int decompress_p(AVCodecContext *avctx,
ret
=
decode_value
(
s
,
s
->
run_model
[
ptype
],
256
,
400
,
&
run
);
ret
=
decode_value
(
s
,
s
->
run_model
[
ptype
],
256
,
400
,
&
run
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
if
(
run
<=
0
)
return
AVERROR_INVALIDDATA
;
switch
(
ptype
)
{
switch
(
ptype
)
{
case
0
:
case
0
:
...
...
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