summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/asn1/a_bitstr.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-09-14 11:18:01 +0000
committermarkus <markus@openbsd.org>2002-09-14 11:18:01 +0000
commitcf5de1f602bfe31a1de0d5bcba280f0bf0a50ae2 (patch)
tree2658bb71397039b6e8ea6265a0bfe5a109de2a64 /lib/libcrypto/asn1/a_bitstr.c
parentspaces (diff)
downloadwireguard-openbsd-cf5de1f602bfe31a1de0d5bcba280f0bf0a50ae2.tar.xz
wireguard-openbsd-cf5de1f602bfe31a1de0d5bcba280f0bf0a50ae2.zip
merge with openssl-0.9.7-stable-SNAP-20020911,
new minor for libcrypto (_X509_REQ_print_ex) tested by miod@, pb@
Diffstat (limited to 'lib/libcrypto/asn1/a_bitstr.c')
-rw-r--r--lib/libcrypto/asn1/a_bitstr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libcrypto/asn1/a_bitstr.c b/lib/libcrypto/asn1/a_bitstr.c
index ed0bdfbde1a..e0265f69d2a 100644
--- a/lib/libcrypto/asn1/a_bitstr.c
+++ b/lib/libcrypto/asn1/a_bitstr.c
@@ -120,6 +120,12 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
unsigned char *p,*s;
int i;
+ if (len < 1)
+ {
+ i=ASN1_R_STRING_TOO_SHORT;
+ goto err;
+ }
+
if ((a == NULL) || ((*a) == NULL))
{
if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL);