# HG changeset patch # User kostya # Date 1228554071 0 # Node ID bb310197d59f59fc75ff3250ec1fc29e5047bbf9 # Parent 48dcf657f897592787b7c1e16ab820eed08cabd2 Print out some errors found during MS RLE decoding diff -r 48dcf657f897 -r bb310197d59f msrledec.c --- a/msrledec.c Sat Dec 06 08:57:31 2008 +0000 +++ b/msrledec.c Sat Dec 06 09:01:11 2008 +0000 @@ -145,8 +145,10 @@ p2 = *src++; if(p2 == 0) { //End-of-line 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; + } pos = 0; continue; } else if(p2 == 1) { //End-of-picture @@ -155,8 +157,10 @@ p1 = *src++; p2 = *src++; line -= p2; - if (line < 0) + if (line < 0){ + av_log(avctx, AV_LOG_ERROR, "Skip beyond picture bounds\n"); return -1; + } pos += p1; output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3); continue;