summaryrefslogtreecommitdiffstats
path: root/src/lib/util/encode/base_n.cc
diff options
context:
space:
mode:
authorOcean Wang <wanghaidong@cnnic.cn>2011-05-03 13:14:49 +0200
committerOcean Wang <wanghaidong@cnnic.cn>2011-05-03 13:14:49 +0200
commit16f90854f8957d12e2861bc77303f186402a8805 (patch)
tree0c2b89f4fd23a8835c6f6ce435a067543ead5727 /src/lib/util/encode/base_n.cc
parent[trac890] added some more detailed comments about the addition of rpath (diff)
downloadkea-16f90854f8957d12e2861bc77303f186402a8805.tar.xz
kea-16f90854f8957d12e2861bc77303f186402a8805.zip
[trac838] check the iterator before deference it
Diffstat (limited to 'src/lib/util/encode/base_n.cc')
-rw-r--r--src/lib/util/encode/base_n.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/util/encode/base_n.cc b/src/lib/util/encode/base_n.cc
index e79f11d11f..46cb02c92b 100644
--- a/src/lib/util/encode/base_n.cc
+++ b/src/lib/util/encode/base_n.cc
@@ -123,6 +123,9 @@ public:
if (in_pad_) {
return (BINARY_ZERO_CODE);
} else {
+ if (base_ == base_end_) {
+ isc_throw(BadValue, "end of input");
+ }
return (*base_);
}
}