Mercurial > mplayer.hg
diff libmpcodecs/native/qtrle.c @ 6656:92b29c3ed0c0
bugfix by Michael.Lampe@iwr.uni-heidelberg.de
author | arpi |
---|---|
date | Sat, 06 Jul 2002 15:17:27 +0000 |
parents | 628c85c15c7b |
children | 180e27f21ff2 |
line wrap: on
line diff
--- a/libmpcodecs/native/qtrle.c Sat Jul 06 15:14:32 2002 +0000 +++ b/libmpcodecs/native/qtrle.c Sat Jul 06 15:17:27 2002 +0000 @@ -61,7 +61,8 @@ { pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel); - while ((rle_code = (signed char)encoded[stream_ptr++]) != -1) + while (stream_ptr < encoded_size && + (rle_code = (signed char)encoded[stream_ptr++]) != -1) { if (rle_code == 0) // there's another skip code in the stream