git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3df8809
)
skip incomplete frames
author
Justin Ruggles
<justin.ruggles@gmail.com>
Sat, 15 Sep 2007 02:44:28 +0000
(
02:44
+0000)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Sat, 15 Sep 2007 02:44:28 +0000
(
02:44
+0000)
Originally committed as revision 10497 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/ac3dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/ac3dec.c
b/libavcodec/ac3dec.c
index
70c4d93
..
6fd1e47
100644
(file)
--- a/
libavcodec/ac3dec.c
+++ b/
libavcodec/ac3dec.c
@@
-1120,6
+1120,12
@@
static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
avctx->sample_rate = ctx->sampling_rate;
avctx->bit_rate = ctx->bit_rate;
+ /* check that reported frame size fits in input buffer */
+ if(ctx->frame_size > buf_size) {
+ av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
+ return -1;
+ }
+
/* channel config */
ctx->out_channels = ctx->nchans;
if (avctx->channels == 0) {