projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd2127a
)
audemux: Check channels isnt 0
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 22 Apr 2012 13:32:58 +0000
(15:32 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 22 Apr 2012 13:34:15 +0000
(15:34 +0200)
Fixes a division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/au.c
patch
|
blob
|
history
diff --git
a/libavformat/au.c
b/libavformat/au.c
index
67e6cab
..
bec0d76
100644
(file)
--- a/
libavformat/au.c
+++ b/
libavformat/au.c
@@
-150,6
+150,11
@@
static int au_read_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
}
+ if (channels <= 0) {
+ av_log(s, AV_LOG_ERROR, "Invalid number of channels %d\n", channels);
+ return AVERROR_INVALIDDATA;
+ }
+
if (size >= 24) {
/* skip unused data */
avio_skip(pb, size - 24);