From 613922f3ddec108e9e3452b0260c8d345cdcf162 Mon Sep 17 00:00:00 2001 From: valentin Date: Tue, 10 Jul 2018 11:03:47 +0300 Subject: [PATCH] Fixed signature iterator loop. We must reduce the iterator because the call qvector::erase() shifts vector and causes skipping elements of iterator in the loop. This cause crashes in some situations. --- SigMaker/Generate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SigMaker/Generate.cpp b/SigMaker/Generate.cpp index e0c0a29..5bf7056 100644 --- a/SigMaker/Generate.cpp +++ b/SigMaker/Generate.cpp @@ -227,7 +227,7 @@ bool AutoGenerate( qSigVector& refvecSig, ea_t dwAddress ) msg( "not enough candidates to proceed. aborting...\n" ); return false; } - vecSig.erase( i ); + vecSig.erase( i-- ); continue; } (*i).iOpCount++; @@ -441,4 +441,4 @@ void GenerateSig( SigType eType ) break; } } -} \ No newline at end of file +}