BIND 10 trac838, updated. c166c0c96a476eea511fe363b90df3d78fae7506 [trac838] Check the iterator is not the end() iterator when dereferenced in DecodeNormalizer
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu May 5 08:41:13 UTC 2011
The branch, trac838 has been updated
via c166c0c96a476eea511fe363b90df3d78fae7506 (commit)
from 0e1eaada6f38f23e7de9404a94b2cd5dd2794879 (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 c166c0c96a476eea511fe363b90df3d78fae7506
Author: Ocean Wang <wanghaidong at cnnic.cn>
Date: Thu May 5 16:39:18 2011 +0800
[trac838] Check the iterator is not the end() iterator when dereferenced in DecodeNormalizer
-----------------------------------------------------------------------
Summary of changes:
src/lib/util/encode/base_n.cc | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/encode/base_n.cc b/src/lib/util/encode/base_n.cc
index a3043a0..966ef8c 100644
--- a/src/lib/util/encode/base_n.cc
+++ b/src/lib/util/encode/base_n.cc
@@ -123,9 +123,6 @@ public:
if (in_pad_) {
return (BINARY_ZERO_CODE);
} else {
- if (base_ == base_end_) {
- isc_throw(BadValue, "end of input");
- }
return (*base_);
}
}
@@ -175,6 +172,10 @@ public:
return (*this);
}
const char& operator*() const {
+ if (base_ == base_end_) {
+ isc_throw(BadValue, "dereference the end iterator");
+ }
+
if (in_pad_ && *base_ == BASE_PADDING_CHAR) {
return (base_zero_code_);
} else {
More information about the bind10-changes
mailing list