summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/asn1/a_bitstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/asn1/a_bitstr.c')
-rw-r--r--crypto/openssl/crypto/asn1/a_bitstr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/asn1/a_bitstr.c b/crypto/openssl/crypto/asn1/a_bitstr.c
index 7013a40..cdedb29 100644
--- a/crypto/openssl/crypto/asn1/a_bitstr.c
+++ b/crypto/openssl/crypto/asn1/a_bitstr.c
@@ -224,6 +224,7 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
w=n/8;
v=1<<(7-(n&0x07));
iv= ~v;
+ if (!value) v=0;
a->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear, set on write */
OpenPOWER on IntegriCloud