]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rv40.c
wmavoice: move overflow handling to common code.
[ffmpeg] / libavcodec / rv40.c
index 465011a079c317c4c4f60b621dd5df69daf99bd4..e5ba215b68d8af0c4ee6284602708439688eec7d 100644 (file)
@@ -109,6 +109,8 @@ static int get_dimension(GetBitContext *gb, const int *dim)
         val = dim[get_bits1(gb) - val];
     if(!val){
         do{
+            if (get_bits_left(gb) < 8)
+                return AVERROR_INVALIDDATA;
             t = get_bits(gb, 8);
             val += t << 2;
         }while(t == 0xFF);