mimic: do not continue if swap_buf_size is 0
authorPaul B Mahol <onemda@gmail.com>
Mon, 12 Mar 2012 14:56:41 +0000 (14:56 +0000)
committerRonald S. Bultje <rsbultje@gmail.com>
Mon, 12 Mar 2012 18:47:48 +0000 (11:47 -0700)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/mimic.c

index 0a6ac26..aa14f64 100644 (file)
@@ -312,7 +312,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
     int quality, num_coeffs;
     int swap_buf_size = buf_size - MIMIC_HEADER_SIZE;
 
-    if(buf_size < MIMIC_HEADER_SIZE) {
+    if (buf_size <= MIMIC_HEADER_SIZE) {
         av_log(avctx, AV_LOG_ERROR, "insufficient data\n");
         return -1;
     }