projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b91c291
)
Make i2c_ASN1_BIT_STRING return the correct length.
author
Dr. Stephen Henson
<steve@openssl.org>
Wed, 29 May 2002 23:13:16 +0000
(23:13 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Wed, 29 May 2002 23:13:16 +0000
(23:13 +0000)
crypto/asn1/a_bitstr.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/a_bitstr.c
b/crypto/asn1/a_bitstr.c
index cdedb29e4f50e27f5448c7676f58060ecae450d7..ecc0d4b8cd4a2c896fd98e7182431ad73bfc16bd 100644
(file)
--- a/
crypto/asn1/a_bitstr.c
+++ b/
crypto/asn1/a_bitstr.c
@@
-89,8
+89,6
@@
int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
if (a == NULL) return(0);
len=a->length;
- ret=1+len;
- if (pp == NULL) return(ret);
if (len > 0)
{
@@
-118,6
+116,10
@@
int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
}
else
bits=0;
+
+ ret=1+len;
+ if (pp == NULL) return(ret);
+
p= *pp;
*(p++)=(unsigned char)bits;