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
48016f8f
Commit
48016f8f
authored
Dec 14, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vc1dec: propagate errors from vc1_parse_sprites()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5f00b333
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
vc1dec.c
libavcodec/vc1dec.c
+10
-4
No files found.
libavcodec/vc1dec.c
View file @
48016f8f
...
...
@@ -5288,7 +5288,7 @@ static void vc1_sprite_parse_transform(GetBitContext* gb, int c[7])
c
[
6
]
=
1
<<
16
;
}
static
void
vc1_parse_sprites
(
VC1Context
*
v
,
GetBitContext
*
gb
,
SpriteData
*
sd
)
static
int
vc1_parse_sprites
(
VC1Context
*
v
,
GetBitContext
*
gb
,
SpriteData
*
sd
)
{
AVCodecContext
*
avctx
=
v
->
s
.
avctx
;
int
sprite
,
i
;
...
...
@@ -5332,7 +5332,7 @@ static void vc1_parse_sprites(VC1Context *v, GetBitContext* gb, SpriteData* sd)
sd
->
effect_pcount2
=
get_bits
(
gb
,
16
);
if
(
sd
->
effect_pcount2
>
10
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Too many effect parameters
\n
"
);
return
;
return
AVERROR_INVALIDDATA
;
}
else
if
(
sd
->
effect_pcount2
)
{
i
=
-
1
;
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Effect params 2: "
);
...
...
@@ -5349,10 +5349,14 @@ static void vc1_parse_sprites(VC1Context *v, GetBitContext* gb, SpriteData* sd)
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Effect flag set
\n
"
);
if
(
get_bits_count
(
gb
)
>=
gb
->
size_in_bits
+
(
avctx
->
codec_id
==
AV_CODEC_ID_WMV3IMAGE
?
64
:
0
))
(
avctx
->
codec_id
==
AV_CODEC_ID_WMV3IMAGE
?
64
:
0
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Buffer overrun
\n
"
);
return
AVERROR_INVALIDDATA
;
}
if
(
get_bits_count
(
gb
)
<
gb
->
size_in_bits
-
8
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"Buffer not fully read
\n
"
);
return
0
;
}
static
void
vc1_draw_sprites
(
VC1Context
*
v
,
SpriteData
*
sd
)
...
...
@@ -5461,7 +5465,9 @@ static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb)
memset
(
&
sd
,
0
,
sizeof
(
sd
));
vc1_parse_sprites
(
v
,
gb
,
&
sd
);
ret
=
vc1_parse_sprites
(
v
,
gb
,
&
sd
);
if
(
ret
<
0
)
return
ret
;
if
(
!
s
->
current_picture
.
f
.
data
[
0
])
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Got no sprites
\n
"
);
...
...
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