From b161b1549c8580e9e7931004d600859734ced2ac Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 Jul 2008 17:31:40 +0000 Subject: [PATCH] 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 --- src/common/tarstrm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.45.2