changeset 6656:92b29c3ed0c0

bugfix by Michael.Lampe@iwr.uni-heidelberg.de
author arpi
date Sat, 06 Jul 2002 15:17:27 +0000
parents 9eefcaf88e56
children 766b6fb28ebf
files libmpcodecs/native/qtrle.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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