BIND 10 trac838, updated. 0e1eaada6f38f23e7de9404a94b2cd5dd2794879 [trac838] Make sure the parameter passed to isspace() is larger than 0 to avoid ASSERT failing on Windows platform.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed May 4 05:52:47 UTC 2011


The branch, trac838 has been updated
       via  0e1eaada6f38f23e7de9404a94b2cd5dd2794879 (commit)
      from  16f90854f8957d12e2861bc77303f186402a8805 (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 0e1eaada6f38f23e7de9404a94b2cd5dd2794879
Author: Ocean Wang <wanghaidong at cnnic.cn>
Date:   Wed May 4 13:50:48 2011 +0800

    [trac838] Make sure the parameter passed to isspace() is larger than 0 to avoid ASSERT failing on Windows platform.

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

Summary of changes:
 src/lib/util/encode/base_n.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/util/encode/base_n.cc b/src/lib/util/encode/base_n.cc
index 46cb02c..a3043a0 100644
--- a/src/lib/util/encode/base_n.cc
+++ b/src/lib/util/encode/base_n.cc
@@ -166,7 +166,7 @@ public:
     {}
     DecodeNormalizer& operator++() {
         ++base_;
-        while (base_ != base_end_ && isspace(*base_)) {
+        while (base_ != base_end_ && (*base_ > 0) && isspace(*base_)) {
             ++base_;
         }
         if (base_ == base_beginpad_) {
@@ -271,7 +271,7 @@ BaseNTransformer<BitsPerChunk, BaseZeroCode, Encoder, Decoder>::decode(
                 isc_throw(BadValue, "Too many " << algorithm
                           << " padding characters: " << input);
             }
-        } else if (!isspace(ch)) {
+        } else if (ch < 0 || !isspace(ch)) {
             break;
         }
         ++srit;




More information about the bind10-changes mailing list