Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sixue.cheng
ffmpeg-7.1
Commits
ae2d3d6b
Commit
ae2d3d6b
authored
13 years ago
by
Justin Ruggles
Committed by
Michael Niedermayer
13 years ago
Browse files
Options
Download
Email Patches
Plain Diff
apedec: set s->currentframeblocks after validating nblocks
parent
998fc04b
n0.8.15
n0.8.14
n0.8.13
n0.8.12
n0.8.11
n0.8.10
n0.8.9
n0.8.8
n0.8.7
n0.8.6
n0.7.17
n0.7.16
n0.7.15
n0.7.14
n0.7.13
n0.7.12
n0.7.11
n0.7.10
n0.7.9
n0.7.8
n0.7.7
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/apedec.c
+2
-2
libavcodec/apedec.c
with
2 additions
and
2 deletions
+2
-2
libavcodec/apedec.c
+
2
-
2
View file @
ae2d3d6b
...
...
@@ -827,7 +827,7 @@ static int ape_decode_frame(AVCodecContext * avctx,
s
->
ptr
=
s
->
last_ptr
=
s
->
data
;
s
->
data_end
=
s
->
data
+
buf_size
;
nblocks
=
s
->
samples
=
bytestream_get_be32
(
&
s
->
ptr
);
nblocks
=
bytestream_get_be32
(
&
s
->
ptr
);
n
=
bytestream_get_be32
(
&
s
->
ptr
);
if
(
n
<
0
||
n
>
3
){
av_log
(
avctx
,
AV_LOG_ERROR
,
"Incorrect offset passed
\n
"
);
...
...
@@ -836,13 +836,13 @@ static int ape_decode_frame(AVCodecContext * avctx,
}
s
->
ptr
+=
n
;
s
->
currentframeblocks
=
nblocks
;
buf
+=
4
;
if
(
!
nblocks
||
nblocks
>
INT_MAX
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid sample count: %u.
\n
"
,
nblocks
);
*
data_size
=
0
;
return
AVERROR_INVALIDDATA
;
}
s
->
currentframeblocks
=
s
->
samples
=
nblocks
;
memset
(
s
->
decoded0
,
0
,
sizeof
(
s
->
decoded0
));
memset
(
s
->
decoded1
,
0
,
sizeof
(
s
->
decoded1
));
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help