Browse Source

dsicinav: Clip the source size to the expected maximum

A packet larger than cin->bitmap_size does not make sense.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
tags/n2.1
Luca Barbato 12 years ago
parent
commit
fd81899321
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/dsicinav.c

+ 2
- 0
libavcodec/dsicinav.c View File

@@ -243,6 +243,8 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
}
}

bitmap_frame_size = FFMIN(cin->bitmap_size, bitmap_frame_size);

/* note: the decoding routines below assumes that
* surface.width = surface.pitch */
switch (bitmap_frame_type) {


Loading…
Cancel
Save