diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-06 15:11:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-06 15:16:51 +0100 |
commit | ddc3ca2caa4a78f0e6824d0d19bc98cfd955b333 (patch) | |
tree | c5f3853a3433eec3cdd35f93b9753affd8b1eb5e /libavcodec | |
parent | 6e9f3f3b6522a8c1440bab66c8a2d85791fd12f7 (diff) | |
parent | da7baaaae79b4d7d715d35ea6bcfbdd149edc177 (diff) | |
download | ffmpeg-ddc3ca2caa4a78f0e6824d0d19bc98cfd955b333.tar.gz |
Merge commit 'da7baaaae79b4d7d715d35ea6bcfbdd149edc177'
* commit 'da7baaaae79b4d7d715d35ea6bcfbdd149edc177':
aasc: fix output for msrle compression.
msrledec: check bounds before constructing a possibly invalid pointer,
cmdutils: remove ansi from the list of broken codecs.
Conflicts:
tests/ref/fate/aasc
Also See: e7117f1c1058d41eb759d1613e849c29b15c85b5
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/msrledec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c index e969994875..cd0a73decf 100644 --- a/libavcodec/msrledec.c +++ b/libavcodec/msrledec.c @@ -144,8 +144,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, if(p1 == 0) { //Escape code p2 = bytestream2_get_byte(gb); if(p2 == 0) { //End-of-line - output = pic->data[0] + (--line) * pic->linesize[0]; - if (line < 0) { + if (--line < 0) { if (bytestream2_get_be16(gb) == 1) { // end-of-picture return 0; } else { @@ -155,6 +154,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, return AVERROR_INVALIDDATA; } } + output = pic->data[0] + line * pic->linesize[0]; pos = 0; continue; } else if(p2 == 1) { //End-of-picture |