From 5ed68178225c82f6525f962b895bce682e9ad05c Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Fri, 23 Sep 2011 19:25:47 -0400 Subject: twinvq: return an error when the packet size is too small --- libavcodec/twinvq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/twinvq.c') diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c index 1326d22ea7..1c800ee184 100644 --- a/libavcodec/twinvq.c +++ b/libavcodec/twinvq.c @@ -831,8 +831,7 @@ static int twin_decode_frame(AVCodecContext * avctx, void *data, if (buf_size*8 < avctx->bit_rate*mtab->size/avctx->sample_rate + 8) { av_log(avctx, AV_LOG_ERROR, "Frame too small (%d bytes). Truncated file?\n", buf_size); - *data_size = 0; - return buf_size; + return AVERROR(EINVAL); } init_get_bits(&gb, buf, buf_size * 8); -- cgit v1.2.3