diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/asn1/ber_dec.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/asn1/ber_dec.cpp b/src/lib/asn1/ber_dec.cpp index 313e7fd15..c5af2f933 100644 --- a/src/lib/asn1/ber_dec.cpp +++ b/src/lib/asn1/ber_dec.cpp @@ -417,6 +417,7 @@ BER_Decoder& BER_Decoder::decode(size_t& out, decode(integer, type_tag, class_tag); if(integer.is_negative()) + throw BER_Decoding_Error("Decoded small integer value was negative"); if(integer.bits() > 32) throw BER_Decoding_Error("Decoded integer value larger than expected"); |