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
73b16198
Commit
73b16198
authored
Jan 05, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
electronicarts: check bytes per sample for validity
Prevents division by zero.
parent
b348c852
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
electronicarts.c
libavformat/electronicarts.c
+5
-0
No files found.
libavformat/electronicarts.c
View file @
73b16198
...
@@ -434,6 +434,11 @@ static int ea_read_header(AVFormatContext *s,
...
@@ -434,6 +434,11 @@ static int ea_read_header(AVFormatContext *s,
ea
->
audio_codec
=
0
;
ea
->
audio_codec
=
0
;
return
1
;
return
1
;
}
}
if
(
ea
->
bytes
<=
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid number of bytes per sample: %d
\n
"
,
ea
->
bytes
);
ea
->
audio_codec
=
CODEC_ID_NONE
;
return
1
;
}
/* initialize the audio decoder stream */
/* initialize the audio decoder stream */
st
=
avformat_new_stream
(
s
,
NULL
);
st
=
avformat_new_stream
(
s
,
NULL
);
...
...
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