diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index c36817c1ee..ed0bdfbde1 100644 --- a/src/lib/libcrypto/asn1/a_bitstr.c +++ b/src/lib/libcrypto/asn1/a_bitstr.c | |||
@@ -71,8 +71,6 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) | |||
71 | if (a == NULL) return(0); | 71 | if (a == NULL) return(0); |
72 | 72 | ||
73 | len=a->length; | 73 | len=a->length; |
74 | ret=1+len; | ||
75 | if (pp == NULL) return(ret); | ||
76 | 74 | ||
77 | if (len > 0) | 75 | if (len > 0) |
78 | { | 76 | { |
@@ -100,6 +98,10 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) | |||
100 | } | 98 | } |
101 | else | 99 | else |
102 | bits=0; | 100 | bits=0; |
101 | |||
102 | ret=1+len; | ||
103 | if (pp == NULL) return(ret); | ||
104 | |||
103 | p= *pp; | 105 | p= *pp; |
104 | 106 | ||
105 | *(p++)=(unsigned char)bits; | 107 | *(p++)=(unsigned char)bits; |