summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-02-03 21:27:04 +0000
committerRichard Levitte <levitte@openssl.org>2002-02-03 21:27:04 +0000
commita5f158fa0b6ae2780d63a37a4eba7a74526006c0 (patch)
tree0e344371640f0f34aab80e35611bb0fede1ed2e4 /crypto/asn1
parent1a11273bc3b0915629ea9afb589be66212080fcd (diff)
ASN1_BIT_STRING_set_bit() didn't clear previously set bits
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/a_bitstr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c
index 7013a407ad..cdedb29e4f 100644
--- a/crypto/asn1/a_bitstr.c
+++ b/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 */