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
405e99bd
Commit
405e99bd
authored
Jan 04, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vorbisdec: Make sure blocksize is not set to an invalid value.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6fcf2bb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vorbisdec.c
libavcodec/vorbisdec.c
+2
-2
No files found.
libavcodec/vorbisdec.c
View file @
405e99bd
...
@@ -935,12 +935,12 @@ static int vorbis_parse_id_hdr(vorbis_context *vc)
...
@@ -935,12 +935,12 @@ static int vorbis_parse_id_hdr(vorbis_context *vc)
vc
->
bitrate_minimum
=
get_bits_long
(
gb
,
32
);
vc
->
bitrate_minimum
=
get_bits_long
(
gb
,
32
);
bl0
=
get_bits
(
gb
,
4
);
bl0
=
get_bits
(
gb
,
4
);
bl1
=
get_bits
(
gb
,
4
);
bl1
=
get_bits
(
gb
,
4
);
vc
->
blocksize
[
0
]
=
(
1
<<
bl0
);
vc
->
blocksize
[
1
]
=
(
1
<<
bl1
);
if
(
bl0
>
13
||
bl0
<
6
||
bl1
>
13
||
bl1
<
6
||
bl1
<
bl0
)
{
if
(
bl0
>
13
||
bl0
<
6
||
bl1
>
13
||
bl1
<
6
||
bl1
<
bl0
)
{
av_log
(
vc
->
avccontext
,
AV_LOG_ERROR
,
" Vorbis id header packet corrupt (illegal blocksize).
\n
"
);
av_log
(
vc
->
avccontext
,
AV_LOG_ERROR
,
" Vorbis id header packet corrupt (illegal blocksize).
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
vc
->
blocksize
[
0
]
=
(
1
<<
bl0
);
vc
->
blocksize
[
1
]
=
(
1
<<
bl1
);
vc
->
win
[
0
]
=
ff_vorbis_vwin
[
bl0
-
6
];
vc
->
win
[
0
]
=
ff_vorbis_vwin
[
bl0
-
6
];
vc
->
win
[
1
]
=
ff_vorbis_vwin
[
bl1
-
6
];
vc
->
win
[
1
]
=
ff_vorbis_vwin
[
bl1
-
6
];
...
...
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