X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b11e8fb66699444389254085844a8084de9f0680..33754c4d83c59b7523a6da0c4fb21079cb60301c:/src/common/gifdecod.cpp?ds=sidebyside diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index ffd45bc87e..1cd7e9f827 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -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)