avcodec/mm: don't fail if x offset exceeds frame width

pull/391/head
Peter Ross 9 months ago
parent 63ea1660fa
commit 66124bc368
  1. 2
      libavcodec/mmvideo.c

@ -161,7 +161,7 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert)
for(j=0; j<8; j++) { for(j=0; j<8; j++) {
int replace = (replace_array >> (7-j)) & 1; int replace = (replace_array >> (7-j)) & 1;
if (x + half_horiz >= s->avctx->width) if (x + half_horiz >= s->avctx->width)
return AVERROR_INVALIDDATA; break;
if (replace) { if (replace) {
int color = bytestream2_get_byte(&data_ptr); int color = bytestream2_get_byte(&data_ptr);
s->frame->data[0][y*s->frame->linesize[0] + x] = color; s->frame->data[0][y*s->frame->linesize[0] + x] = color;

Loading…
Cancel
Save