summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-08-22 22:53:00 +0000
committerAndrew Tridgell <tridge@samba.org>2002-08-22 22:53:00 +0000
commitba2fdbb4c841a917187b512b7021e9da287fe360 (patch)
treea3a8c04d7514daff683c4ef0498f6de00ab0939c /source3
parent8e089e8770722d218c76881e3de2138433e3504c (diff)
downloadsamba-ba2fdbb4c841a917187b512b7021e9da287fe360.tar.gz
samba-ba2fdbb4c841a917187b512b7021e9da287fe360.tar.bz2
samba-ba2fdbb4c841a917187b512b7021e9da287fe360.zip
a ASN.1 fix from anthony
(This used to be commit 5ff687a839f805af56ae77cba94c466a0ff87ccc)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/asn1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c
index 358c23c146..b7cfca41fb 100644
--- a/source3/libsmb/asn1.c
+++ b/source3/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);