]> git.saurik.com Git - wxWidgets.git/commitdiff
blind fix for wxGIFDecoder::ReadGIF
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 22 Nov 2001 23:55:34 +0000 (23:55 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 22 Nov 2001 23:55:34 +0000 (23:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/gifdecod.cpp

index ffd45bc87e6e06cf625dbfd251bb183c15f2ff7f..1cd7e9f82752f81c9c950693162ccf155d8a0a83 100644 (file)
@@ -653,6 +653,9 @@ int wxGIFDecoder::ReadGIF()
     /* try to read to the end of the stream */
     while (type != 0x3B)
     {
+        if (!m_f->IsOk())
+            return wxGIF_TRUNCATED;
+            
         type = (unsigned char)m_f->GetC();
 
         if (type == 0x21)