Commit ce60c2d1 authored by Kostya Shishkov's avatar Kostya Shishkov

Print out some errors found during MS RLE decoding

Originally committed as revision 16012 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 56da1fd7
...@@ -145,8 +145,10 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de ...@@ -145,8 +145,10 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
p2 = *src++; p2 = *src++;
if(p2 == 0) { //End-of-line if(p2 == 0) { //End-of-line
output = pic->data[0] + (--line) * pic->linesize[0]; output = pic->data[0] + (--line) * pic->linesize[0];
if (line < 0) if (line < 0){
av_log(avctx, AV_LOG_ERROR, "Next line is beyond picture bounds\n");
return -1; return -1;
}
pos = 0; pos = 0;
continue; continue;
} else if(p2 == 1) { //End-of-picture } else if(p2 == 1) { //End-of-picture
...@@ -155,8 +157,10 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de ...@@ -155,8 +157,10 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de
p1 = *src++; p1 = *src++;
p2 = *src++; p2 = *src++;
line -= p2; line -= p2;
if (line < 0) if (line < 0){
av_log(avctx, AV_LOG_ERROR, "Skip beyond picture bounds\n");
return -1; return -1;
}
pos += p1; pos += p1;
output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3); output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3);
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment