diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-01-05 23:34:06 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-01-05 23:34:06 +0000 |
commit | c6affae4bf749a67c90468702eb6d4eeb97a4363 (patch) | |
tree | 0b3dccec518f8332a76e2caad2d552b39720bda7 /source/libsmb | |
parent | 08bb2dfec2ca0282e9268d09da2b966d3bdf493a (diff) | |
download | samba-c6affae4bf749a67c90468702eb6d4eeb97a4363.tar.gz samba-c6affae4bf749a67c90468702eb6d4eeb97a4363.tar.xz samba-c6affae4bf749a67c90468702eb6d4eeb97a4363.zip |
fixed another DATA_BLOB constructor
Diffstat (limited to 'source/libsmb')
-rw-r--r-- | source/libsmb/asn1.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/libsmb/asn1.c b/source/libsmb/asn1.c index 93e95b52bbb..1175a7fe650 100644 --- a/source/libsmb/asn1.c +++ b/source/libsmb/asn1.c @@ -369,13 +369,8 @@ BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob) int len; if (!asn1_start_tag(data, ASN1_OCTET_STRING)) return False; len = asn1_tag_remaining(data); - blob->data = malloc(len); - if (!blob->data) { - data->has_error = True; - return False; - } + *blob = data_blob(NULL, len); asn1_read(data, blob->data, len); - blob->length = len; asn1_end_tag(data); return !data->has_error; } |