summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_bitst.c
diff options
context:
space:
mode:
authordjm <>2005-04-29 05:37:34 +0000
committerdjm <>2005-04-29 05:37:34 +0000
commita95585a25ab25668b931a78b7543f707a3354db8 (patch)
treef9e9febf7ac0c8f5d6df761fe70fd613aac06203 /src/lib/libcrypto/x509v3/v3_bitst.c
parent58c08aa241f168c84ce7cc3052454ea59a44eada (diff)
downloadopenbsd-a95585a25ab25668b931a78b7543f707a3354db8.tar.gz
openbsd-a95585a25ab25668b931a78b7543f707a3354db8.tar.bz2
openbsd-a95585a25ab25668b931a78b7543f707a3354db8.zip
import of openssl-0.9.7g; tested on platforms from alpha to zaurus, ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_bitst.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_bitst.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_bitst.c b/src/lib/libcrypto/x509v3/v3_bitst.c
index 16cf125562..274965306d 100644
--- a/src/lib/libcrypto/x509v3/v3_bitst.c
+++ b/src/lib/libcrypto/x509v3/v3_bitst.c
@@ -124,7 +124,12 @@ static ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
124 for(bnam = method->usr_data; bnam->lname; bnam++) { 124 for(bnam = method->usr_data; bnam->lname; bnam++) {
125 if(!strcmp(bnam->sname, val->name) || 125 if(!strcmp(bnam->sname, val->name) ||
126 !strcmp(bnam->lname, val->name) ) { 126 !strcmp(bnam->lname, val->name) ) {
127 ASN1_BIT_STRING_set_bit(bs, bnam->bitnum, 1); 127 if(!ASN1_BIT_STRING_set_bit(bs, bnam->bitnum, 1)) {
128 X509V3err(X509V3_F_V2I_ASN1_BIT_STRING,
129 ERR_R_MALLOC_FAILURE);
130 M_ASN1_BIT_STRING_free(bs);
131 return NULL;
132 }
128 break; 133 break;
129 } 134 }
130 } 135 }