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:
3fa646e
)
Report an error if pitch_lag is zero in AMR-NB decoder.
author
Oana Stratulat
<oanaandreeastratulat@gmail.com>
Wed, 4 Jan 2012 23:08:05 +0000
(
01:08
+0200)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Thu, 5 Jan 2012 05:33:14 +0000
(21:33 -0800)
This fixes an infinite loop in the decoder on specially
crafted files, and fixes bug 151.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/amrnbdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/amrnbdec.c
b/libavcodec/amrnbdec.c
index
926014f
..
fff0e72
100644
(file)
--- a/
libavcodec/amrnbdec.c
+++ b/
libavcodec/amrnbdec.c
@@
-977,6
+977,10
@@
static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
pitch_sharpening(p, subframe, p->cur_frame_mode, &fixed_sparse);
+ if (fixed_sparse.pitch_lag == 0) {
+ av_log(avctx, AV_LOG_ERROR, "The file is corrupted, pitch_lag = 0 is not allowed\n");
+ return AVERROR_INVALIDDATA;
+ }
ff_set_fixed_vector(p->fixed_vector, &fixed_sparse, 1.0,
AMR_SUBFRAME_SIZE);