# HG changeset patch # User arpi # Date 1025968647 0 # Node ID 92b29c3ed0c0b51ee75878d91dc0e392090e613b # Parent 9eefcaf88e568ce743f612d51dd1795b0edc50a5 bugfix by Michael.Lampe@iwr.uni-heidelberg.de diff -r 9eefcaf88e56 -r 92b29c3ed0c0 libmpcodecs/native/qtrle.c --- 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