avcodec/vqavideo: check destination size on all exit pathes
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Dec 2013 11:52:23 +0000 (12:52 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Dec 2013 12:16:00 +0000 (13:16 +0100)
Fixes part of msan_uninit-mem_7f841fe2ab3b_4608_cow2_1.vqa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vqavideo.c

index 911e713..d544ad8 100644 (file)
@@ -238,7 +238,7 @@ static int decode_format80(VqaContext *s, int src_size,
 
         /* 0x80 means that frame is finished */
         if (opcode == 0x80)
-            return 0;
+            break;
 
         if (dest_index >= dest_size) {
             av_log(s->avctx, AV_LOG_ERROR, "decode_format80 problem: dest_index (%d) exceeded dest_size (%d)\n",