diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2017-11-02 17:35:19 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2017-11-02 17:35:19 +0000 |
commit | b6a9311a3edd056eaacbcbae2fcb723df5d99057 (patch) | |
tree | 720225dbdc898757e7df9a925ec85ade660013c1 /crypto/asn1/a_bitstr.c | |
parent | 12df5ad9af4981f5d3c31a9819d31618c0f1af51 (diff) |
Diffstat (limited to 'crypto/asn1/a_bitstr.c')
-rw-r--r-- | crypto/asn1/a_bitstr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c index c429342e03d42..0c8bb144a099b 100644 --- a/crypto/asn1/a_bitstr.c +++ b/crypto/asn1/a_bitstr.c @@ -56,6 +56,7 @@ * [including the GNU Public Licence.] */ +#include <limits.h> #include <stdio.h> #include "cryptlib.h" #include <openssl/asn1.h> @@ -136,6 +137,11 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, goto err; } + if (len > INT_MAX) { + i = ASN1_R_STRING_TOO_LONG; + goto err; + } + if ((a == NULL) || ((*a) == NULL)) { if ((ret = M_ASN1_BIT_STRING_new()) == NULL) return (NULL); |