summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_bitstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bitstr.c')
-rw-r--r--src/lib/libcrypto/asn1/a_bitstr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c
index ed0bdfbde1..e0265f69d2 100644
--- a/src/lib/libcrypto/asn1/a_bitstr.c
+++ b/src/lib/libcrypto/asn1/a_bitstr.c
@@ -120,6 +120,12 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
120 unsigned char *p,*s; 120 unsigned char *p,*s;
121 int i; 121 int i;
122 122
123 if (len < 1)
124 {
125 i=ASN1_R_STRING_TOO_SHORT;
126 goto err;
127 }
128
123 if ((a == NULL) || ((*a) == NULL)) 129 if ((a == NULL) || ((*a) == NULL))
124 { 130 {
125 if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL); 131 if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL);