Parcourir la source

[trac838] check the iterator before deference it

Ocean Wang il y a 14 ans
Parent
commit
16f90854f8
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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_);
         }
     }