projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6ab681a
)
tta: error out if samplerate is zero.
author
Ronald S. Bultje
<rsbultje@gmail.com>
Fri, 10 Feb 2012 18:51:43 +0000
(10:51 -0800)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Sat, 11 Feb 2012 16:13:53 +0000
(08:13 -0800)
Prevents a division by zero later on.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/tta.c
patch
|
blob
|
history
diff --git
a/libavcodec/tta.c
b/libavcodec/tta.c
index
853f6a2
..
28d0e9b
100644
(file)
--- a/
libavcodec/tta.c
+++ b/
libavcodec/tta.c
@@
-223,6
+223,9
@@
static av_cold int tta_decode_init(AVCodecContext * avctx)
if (s->channels == 0) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid number of channels\n");
return AVERROR_INVALIDDATA;
+ } else if (avctx->sample_rate == 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Invalid samplerate\n");
+ return AVERROR_INVALIDDATA;
}
switch(s->bps) {