From 8ccaf2162a97e5a86633d4a3df9a056a54d21dab Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 25 Jun 2009 17:06:51 +0000 Subject: Require exact match for environment variables before they are interpreted as options (rather than simply matching as a prefix to an option name). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@788439 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/Options.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/qpid/Options.cpp b/cpp/src/qpid/Options.cpp index e521b1220a..cc48323266 100644 --- a/cpp/src/qpid/Options.cpp +++ b/cpp/src/qpid/Options.cpp @@ -55,7 +55,8 @@ struct EnvOptMapper { } static bool matchStr(const string& env, boost::shared_ptr desc) { - return std::equal(env.begin(), env.end(), desc->long_name().begin(), &matchChar); + return desc->long_name().size() == env.size() && + std::equal(env.begin(), env.end(), desc->long_name().begin(), &matchChar); } static bool matchCase(const string& env, boost::shared_ptr desc) { -- cgit v1.2.1