From b013268fe327f6171c9c224bf1ef6a8178def2b9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 30 Aug 2012 12:54:45 +0200 Subject: [PATCH] multi: fix SEGV for scan --- src/filter_multi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filter_multi.cpp b/src/filter_multi.cpp index ccdcc4a..b32c115 100644 --- a/src/filter_multi.cpp +++ b/src/filter_multi.cpp @@ -1112,7 +1112,7 @@ void yf::Multi::Frontend::scan2(mp::Package &package, Z_APDU *apdu_req) entries_before.begin(); while (it != entries_before.end() && my <*it) it++; - if (my == *it) + if (it != entries_before.end() && my == *it) { it->m_count += my.m_count; } @@ -1153,7 +1153,7 @@ void yf::Multi::Frontend::scan2(mp::Package &package, Z_APDU *apdu_req) entries_after.begin(); while (it != entries_after.end() && *it < my) it++; - if (my == *it) + if (it != entries_after.end() && my == *it) { it->m_count += my.m_count; } -- 1.7.10.4