]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/indeo2.c
libavcodec/zmbv: change 24-bit decoder channel order, from RGB24 to BGR24
[ffmpeg] / libavcodec / indeo2.c
index 4971b84308f850a248792cb13507392f51d3cf6e..09cb560d8eff3fae7f1d88f217f6c4720cc5940c 100644 (file)
@@ -56,7 +56,7 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst
     int j;
     int out = 0;
 
-    if (width & 1)
+    if ((width & 1) || width * height / (2*(IR2_CODES - 0x7F)) > get_bits_left(&ctx->gb))
         return AVERROR_INVALIDDATA;
 
     /* first line contain absolute values, other lines contain deltas */