harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r471239 - /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/gifdecoder.c
Date Sat, 04 Nov 2006 17:59:27 GMT
Author: apetrenko
Date: Sat Nov  4 09:59:26 2006
New Revision: 471239

URL: http://svn.apache.org/viewvc?view=rev&rev=471239
Log:
Patch for HARMONY-1647 "[classlib][awt][gifdecoder] Memory corruption while decoding non-interlaced
GIF"

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/gifdecoder.c

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/gifdecoder.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/gifdecoder.c?view=diff&rev=471239&r1=471238&r2=471239
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/gifdecoder.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/gl/shared/gifdecoder.c
Sat Nov  4 09:59:26 2006
@@ -785,6 +785,8 @@
           // Now process the obtained code
           if (di->currCode == di->eoiCode) { // EOI encountered, stop processing
             decoder->inputPtr += blockSize;
+            // Ensure that no more data will be decoded
+            di->shiftState = 0;
             blockSize = 0;
             decoder->doProcessing = FALSE;
           } else if(di->currCode == di->clearCode) { // Clear code - reset code size
@@ -979,6 +981,8 @@
           if (di->currCode == di->eoiCode) { // EOI encountered, stop processing
             decoder->inputPtr += blockSize;
             decoder->leftInBlock = 0;
+            // Ensure that no more data will be decoded
+            di->shiftState = 0;            
             blockSize = 0;
             decoder->doProcessing = FALSE;
           } else if(di->currCode == di->clearCode) { // Clear code - reset code size



Mime
View raw message