diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-08-22 22:53:00 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-08-22 22:53:00 +0000 |
commit | 5ff687a839f805af56ae77cba94c466a0ff87ccc (patch) | |
tree | 18d8cf427857c072ca8a10ff355edb8387cc8ee7 /source/libsmb | |
parent | c00388de6cf5d0527505bfe4edfe2f0269c5a4c8 (diff) | |
download | samba-5ff687a839f805af56ae77cba94c466a0ff87ccc.tar.gz samba-5ff687a839f805af56ae77cba94c466a0ff87ccc.tar.xz samba-5ff687a839f805af56ae77cba94c466a0ff87ccc.zip |
a ASN.1 fix from anthony
Diffstat (limited to 'source/libsmb')
-rw-r--r-- | source/libsmb/asn1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/libsmb/asn1.c b/source/libsmb/asn1.c index 358c23c1465..b7cfca41fbf 100644 --- a/source/libsmb/asn1.c +++ b/source/libsmb/asn1.c @@ -373,6 +373,7 @@ BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s) BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob) { int len; + ZERO_STRUCTP(blob); if (!asn1_start_tag(data, ASN1_OCTET_STRING)) return False; len = asn1_tag_remaining(data); *blob = data_blob(NULL, len); @@ -389,7 +390,8 @@ BOOL asn1_read_Integer(ASN1_DATA *data, int *i) if (!asn1_start_tag(data, ASN1_INTEGER)) return False; while (asn1_tag_remaining(data)>0) { - *i = (*i << 8) + asn1_read_uint8(data, &b); + asn1_read_uint8(data, &b); + *i = (*i << 8) + b; } return asn1_end_tag(data); |