diff options
author | Gergely Nagy <ngg@tresorit.com> | 2016-12-14 13:19:01 +0100 |
---|---|---|
committer | Gergely Nagy <ngg@tresorit.com> | 2016-12-14 13:19:01 +0100 |
commit | 3d9181d7bdd8e491f745dbc9e34bd20b6f6da069 (patch) | |
tree | bfbf787ff14d5396980742b5ea7105b7933333d7 /asn.h | |
parent | 20c58248075d9cbbe72b95372ac9d41a2c52cd8a (diff) | |
download | cryptopp-git-3d9181d7bdd8e491f745dbc9e34bd20b6f6da069.tar.gz |
Fix possible DoS in ASN.1 decoders (CVE-2016-9939)
Diffstat (limited to 'asn.h')
-rw-r--r-- | asn.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -498,6 +498,8 @@ void BERDecodeUnsigned(BufferedTransformation &in, T &w, byte asnTag = INTEGER, bool definite = BERLengthDecode(in, bc);
if (!definite)
BERDecodeError();
+ if (bc > in.MaxRetrievable())
+ BERDecodeError();
SecByteBlock buf(bc);
|