summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_bitstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/a_bitstr.c')
-rw-r--r--crypto/asn1/a_bitstr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c
index f8938ad107..7b3991a071 100644
--- a/crypto/asn1/a_bitstr.c
+++ b/crypto/asn1/a_bitstr.c
@@ -110,8 +110,7 @@ ASN1_BIT_STRING *ossl_c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
* We do this to preserve the settings. If we modify the settings, via
* the _set_bit function, we will recalculate on output
*/
- ret->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); /* clear */
- ret->flags |= (ASN1_STRING_FLAG_BITS_LEFT | i); /* set */
+ ossl_asn1_string_set_bits_left(ret, i);
if (len-- > 1) { /* using one because of the bits left byte */
s = OPENSSL_malloc((int)len);