Browse Source

avcodec/sunrast: Fix input buffer pointer check

Fixes: out of array read
Fixes: poc.dat

Found-by: Bingchang, Liu @VARAS of IIE
Tested-by: bc L <l.bing.chang.bc@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 37138338ff)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.1
Michael Niedermayer 9 years ago
parent
commit
7521d5b8da
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/sunrast.c

+ 1
- 1
libavcodec/sunrast.c View File

@@ -168,7 +168,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
}
} else {
for (y = 0; y < h; y++) {
if (buf_end - buf < len)
if (buf_end - buf < alen)
break;
memcpy(ptr, buf, len);
ptr += stride;


Loading…
Cancel
Save