提交 08241a58 编写于 作者: D Dr. Stephen Henson

Make i2c_ASN1_BIT_STRING return the correct length.
上级 3d27b1fa
...@@ -71,8 +71,6 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) ...@@ -71,8 +71,6 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
if (a == NULL) return(0); if (a == NULL) return(0);
len=a->length; len=a->length;
ret=1+len;
if (pp == NULL) return(ret);
if (len > 0) if (len > 0)
{ {
...@@ -100,6 +98,10 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) ...@@ -100,6 +98,10 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
} }
else else
bits=0; bits=0;
ret=1+len;
if (pp == NULL) return(ret);
p= *pp; p= *pp;
*(p++)=(unsigned char)bits; *(p++)=(unsigned char)bits;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册