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
a43283b6
Commit
a43283b6
authored
Oct 16, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavdec: check size before reading the data, not after.
parent
79922d72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
wavdec.c
libavformat/wavdec.c
+2
-3
No files found.
libavformat/wavdec.c
View file @
a43283b6
...
...
@@ -204,7 +204,7 @@ static int wav_read_header(AVFormatContext *s)
int64_t
size
,
av_uninit
(
data_size
);
int64_t
sample_count
=
0
;
int
rf64
;
uint32_t
tag
,
list_type
;
uint32_t
tag
;
AVIOContext
*
pb
=
s
->
pb
;
AVStream
*
st
=
NULL
;
WAVDemuxContext
*
wav
=
s
->
priv_data
;
...
...
@@ -287,12 +287,11 @@ static int wav_read_header(AVFormatContext *s)
return
ret
;
break
;
case
MKTAG
(
'L'
,
'I'
,
'S'
,
'T'
):
list_type
=
avio_rl32
(
pb
);
if
(
size
<
4
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"too short LIST"
);
return
AVERROR_INVALIDDATA
;
}
switch
(
list_type
)
{
switch
(
avio_rl32
(
pb
)
)
{
case
MKTAG
(
'I'
,
'N'
,
'F'
,
'O'
):
if
((
ret
=
ff_read_riff_info
(
s
,
size
-
4
))
<
0
)
return
ret
;
...
...
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