From a5f158fa0b6ae2780d63a37a4eba7a74526006c0 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 3 Feb 2002 21:27:04 +0000 Subject: [PATCH] ASN1_BIT_STRING_set_bit() didn't clear previously set bits --- CHANGES | 4 ++++ crypto/asn1/a_bitstr.c | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 713f01b742..2c6d772d14 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,10 @@ Changes between 0.9.6c and 0.9.6d [XX xxx XXXX] + *) Have ASN1_BIT_STRING_set_bit() really clear a bit when the requested + value is 0. + [Richard Levitte] + *) Add the configuration target linux-s390x. [Neale Ferguson via Richard Levitte] 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 */ -- 2.25.1