OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc30c27
)
sonic: fix FPE
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 25 Jun 2012 22:38:05 +0000
(
00:38
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 25 Jun 2012 22:38:05 +0000
(
00:38
+0200)
Fixes Ticket1397
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/sonic.c
patch
|
blob
|
history
diff --git
a/libavcodec/sonic.c
b/libavcodec/sonic.c
index
da0f549
..
d42b07d
100644
(file)
--- a/
libavcodec/sonic.c
+++ b/
libavcodec/sonic.c
@@
-796,6
+796,11
@@
static av_cold int sonic_decode_init(AVCodecContext *avctx)
s->decorrelation = get_bits(&gb, 2);
s->downsampling = get_bits(&gb, 2);
+ if (!s->downsampling) {
+ av_log(avctx, AV_LOG_ERROR, "invalid downsampling value\n");
+ return AVERROR_INVALIDDATA;
+ }
+
s->num_taps = (get_bits(&gb, 5)+1)<<5;
if (get_bits1(&gb)) // XXX FIXME
av_log(avctx, AV_LOG_INFO, "Custom quant table\n");