diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-14 17:10:33 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-29 15:06:31 -0400 |
commit | 1fead73d7b3a71a662a986559d665e0dd0916688 (patch) | |
tree | 5d46a8f0fdd5de5ecec1b7f6f74e712f8a8b818d /libavcodec/atrac3.c | |
parent | 7e4881a2d074a7dfba7ee1990b3e17c9276f985d (diff) | |
download | ffmpeg-1fead73d7b3a71a662a986559d665e0dd0916688.tar.gz |
atrac3: return error if packet is too small
Diffstat (limited to 'libavcodec/atrac3.c')
-rw-r--r-- | libavcodec/atrac3.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 6828ff054e..37245ef6a0 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -834,8 +834,7 @@ static int atrac3_decode_frame(AVCodecContext *avctx, if (buf_size < avctx->block_align) { av_log(avctx, AV_LOG_ERROR, "Frame too small (%d bytes). Truncated file?\n", buf_size); - *data_size = 0; - return buf_size; + return AVERROR_INVALIDDATA; } out_size = 1024 * q->channels * av_get_bytes_per_sample(avctx->sample_fmt); |