From: Vadim Zeitlin Date: Tue, 15 Jul 2008 17:31:40 +0000 (+0000) Subject: test ok in the record reading loop as otherwise we never exit from it if there is... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b161b1549c8580e9e7931004d600859734ced2ac?ds=inline test ok in the record reading loop as otherwise we never exit from it if there is an invalid character in the record git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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;