BIND 10 trac2317, updated. 1cee583601a4e084bf54cf90e0d52b79f0783700 [2317] Pass a string object to is_any_of() instead of char* value.

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Jan 15 09:07:32 UTC 2013


The branch, trac2317 has been updated
       via  1cee583601a4e084bf54cf90e0d52b79f0783700 (commit)
      from  7d705b35fe149cc0c6b93211f2733537b05bd905 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1cee583601a4e084bf54cf90e0d52b79f0783700
Author: Marcin Siodelski <marcin at isc.org>
Date:   Tue Jan 15 10:07:17 2013 +0100

    [2317] Pass a string object to is_any_of() instead of char* value.
    
    This is a workaround for the warnings on Debian6: "array subscript is
    above array bounds".

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcp/option_definition.cc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc
index 6db9e4b..d2b5aae 100644
--- a/src/lib/dhcp/option_definition.cc
+++ b/src/lib/dhcp/option_definition.cc
@@ -220,12 +220,12 @@ OptionDefinition::validate() const {
     if (!all(name_, boost::is_from_range('a', 'z') ||
              boost::is_from_range('A', 'Z') ||
              boost::is_digit() ||
-             boost::is_any_of("-_")) ||
+             boost::is_any_of(std::string("-_"))) ||
         name_.empty() ||
         // Hyphens and underscores are not allowed at the beginning
         // and at the end of the option name.
-        all(find_head(name_, 1), boost::is_any_of("-_")) ||
-        all(find_tail(name_, 1), boost::is_any_of("-_"))) {
+        all(find_head(name_, 1), boost::is_any_of(std::string("-_"))) ||
+        all(find_tail(name_, 1), boost::is_any_of(std::string("-_")))) {
         err_str << "invalid option name '" << name_ << "'";
 
     } else if (type_ >= OPT_UNKNOWN_TYPE) {



More information about the bind10-changes mailing list