summaryrefslogtreecommitdiff
path: root/asn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'asn.cpp')
-rw-r--r--asn.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/asn.cpp b/asn.cpp
index 3ebbaf7..8ae1ad6 100644
--- a/asn.cpp
+++ b/asn.cpp
@@ -232,6 +232,8 @@ size_t OID::DecodeValue(BufferedTransformation &bt, word32 &v)
if (!bt.Get(b))
BERDecodeError();
i++;
+ if (v >> (8*sizeof(v)-7)) // v about to overflow
+ BERDecodeError();
v <<= 7;
v += b & 0x7f;
if (!(b & 0x80))