Browse Source

[trac838] check the iterator before deference it

Ocean Wang 14 years ago
parent
commit
16f90854f8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/lib/util/encode/base_n.cc

+ 3 - 0
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_);
         }
     }