diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-02-08 11:33:07 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-02-08 11:33:07 +0000 |
commit | 8879a9b292628590d8ccdcc1e7b225ba22605d2c (patch) | |
tree | 89e5646a13aeccf4a5720889f72b096f778a7d90 /lib/element.c | |
parent | b82dd2e6ed1ce1a00ef346e516e02d2c254410e6 (diff) | |
download | libtasn1-8879a9b292628590d8ccdcc1e7b225ba22605d2c.tar.gz libtasn1-8879a9b292628590d8ccdcc1e7b225ba22605d2c.tar.bz2 libtasn1-8879a9b292628590d8ccdcc1e7b225ba22605d2c.zip |
Add libtasn1 fixes from Nikos, prompted by report from "Evgeny Legerov" <admin@gleg.net>.
Diffstat (limited to 'lib/element.c')
-rw-r--r-- | lib/element.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/element.c b/lib/element.c index 4357634..35ae24f 100644 --- a/lib/element.c +++ b/lib/element.c @@ -677,7 +677,7 @@ asn1_read_value(ASN1_TYPE root,const char *name,void* ivalue, int *len) } else{ len2=-1; - if (_asn1_get_octet_der(node->value,&len2,value, value_size, len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; + if (_asn1_get_octet_der(node->value,node->value_len,&len2,value, value_size, len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; } break; case TYPE_OBJECT_ID: @@ -709,22 +709,22 @@ asn1_read_value(ASN1_TYPE root,const char *name,void* ivalue, int *len) break; case TYPE_OCTET_STRING: len2=-1; - if (_asn1_get_octet_der(node->value,&len2,value, value_size, len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; + if (_asn1_get_octet_der(node->value,node->value_len,&len2,value, value_size, len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; break; case TYPE_GENERALSTRING: len2=-1; - if (_asn1_get_octet_der(node->value,&len2,value, value_size, len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; + if (_asn1_get_octet_der(node->value,node->value_len,&len2,value, value_size, len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; break; case TYPE_BIT_STRING: len2=-1; - if (_asn1_get_bit_der(node->value,&len2,value,value_size,len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; + if (_asn1_get_bit_der(node->value,node->value_len,&len2,value,value_size,len)!=ASN1_SUCCESS) return ASN1_MEM_ERROR; break; case TYPE_CHOICE: PUT_STR_VALUE( value, value_size, node->down->name); break; case TYPE_ANY: len3=-1; - len2=_asn1_get_length_der(node->value,&len3); + len2=_asn1_get_length_der(node->value,node->value_len,&len3); PUT_VALUE( value, value_size, node->value+len3, len2); break; default: |