From: Adam Dickmeiss Date: Thu, 30 Aug 2012 10:54:45 +0000 (+0200) Subject: multi: fix SEGV for scan X-Git-Tag: v1.3.44~2 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=b013268fe327f6171c9c224bf1ef6a8178def2b9;p=metaproxy-moved-to-github.git multi: fix SEGV for scan --- 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; }