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
4a7876c6
Commit
4a7876c6
authored
Sep 30, 2011
by
Laurent Aimar
Committed by
Michael Niedermayer
Oct 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for out of bound writes in the QDM2 decoder.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
491eaf35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
qdm2.c
libavcodec/qdm2.c
+4
-0
No files found.
libavcodec/qdm2.c
View file @
4a7876c6
...
...
@@ -1800,6 +1800,8 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
avctx
->
channels
=
s
->
nb_channels
=
s
->
channels
=
AV_RB32
(
extradata
);
extradata
+=
4
;
if
(
s
->
channels
>
MPA_MAX_CHANNELS
)
return
AVERROR_INVALIDDATA
;
avctx
->
sample_rate
=
AV_RB32
(
extradata
);
extradata
+=
4
;
...
...
@@ -1821,6 +1823,8 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
// something like max decodable tones
s
->
group_order
=
av_log2
(
s
->
group_size
)
+
1
;
s
->
frame_size
=
s
->
group_size
/
16
;
// 16 iterations per super block
if
(
s
->
frame_size
>
FF_ARRAY_ELEMS
(
s
->
output_buffer
)
/
2
)
return
AVERROR_INVALIDDATA
;
s
->
sub_sampling
=
s
->
fft_order
-
7
;
s
->
frequency_range
=
255
/
(
1
<<
(
2
-
s
->
sub_sampling
));
...
...
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