From a6758e9bb48c9ba985975f9af1e0db5105d7aaf8 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 14 Mar 2013 14:59:38 +0000 Subject: QPID-4558: Fix string iterator being dereferenced 1 beyond end(). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1456464 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/SelectorToken.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/broker/SelectorToken.cpp b/qpid/cpp/src/qpid/broker/SelectorToken.cpp index 3fd4abbc49..3540ee158f 100644 --- a/qpid/cpp/src/qpid/broker/SelectorToken.cpp +++ b/qpid/cpp/src/qpid/broker/SelectorToken.cpp @@ -77,7 +77,7 @@ bool tokeniseIdentifier(std::string::const_iterator& s, std::string::const_itera std::string::const_iterator t = s; - while ( s!=e && isIdentifierPart(*++s) ); + while ( ++s!=e && isIdentifierPart(*s) ); tok = Token(T_IDENTIFIER, t, s); @@ -214,7 +214,7 @@ bool tokeniseOperator(std::string::const_iterator& s, std::string::const_iterato std::string::const_iterator t = s; - while (s!=e && isOperatorPart(*++s)); + while (++s!=e && isOperatorPart(*s)); tok = Token(T_OPERATOR, t, s); return true; -- cgit v1.2.1