X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7a4c4bd39a142fe77a04aa3a5e83c29f32819a7..b53aea81d2e102224b452ef5bf7aee1132f37c6f:/src/common/tarstrm.cpp?ds=sidebyside diff --git a/src/common/tarstrm.cpp b/src/common/tarstrm.cpp index b763de5a2e..7eb827582e 100644 --- a/src/common/tarstrm.cpp +++ b/src/common/tarstrm.cpp @@ -945,7 +945,7 @@ bool wxTarInputStream::ReadExtendedHeader(wxTarHeaderRecords*& recs) size_t recPos, recSize; bool ok = true; - for (recPos = 0; recPos < len; recPos += recSize) { + for (recPos = 0; recPos < len && ok; recPos += recSize) { char *pRec = buf.data() + recPos; char *p = pRec;