Commit a5f158fa authored by Richard Levitte's avatar Richard Levitte
Browse files

ASN1_BIT_STRING_set_bit() didn't clear previously set bits

parent 1a11273b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 <Neale.Ferguson@SoftwareAG-USA.com> via Richard Levitte]

+1 −0
Original line number Diff line number Diff line
@@ -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 */