mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s4: libcli: ldap message - Ensure all asn1_XX returns are checked.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 26 03:15:00 CEST 2014 on sn-devel-104
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -228,7 +228,7 @@ bool asn1_read_OctetString_talloc(TALLOC_CTX *mem_ctx,
|
|||||||
struct asn1_data *data,
|
struct asn1_data *data,
|
||||||
const char **result);
|
const char **result);
|
||||||
|
|
||||||
void ldap_decode_attribs_bare(TALLOC_CTX *mem_ctx, struct asn1_data *data,
|
bool ldap_decode_attribs_bare(TALLOC_CTX *mem_ctx, struct asn1_data *data,
|
||||||
struct ldb_message_element **attributes,
|
struct ldb_message_element **attributes,
|
||||||
int *num_attributes);
|
int *num_attributes);
|
||||||
|
|
||||||
|
@ -1197,10 +1197,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out)
|
|||||||
if (!asn1_start_tag(data, ASN1_CONTEXT(0))) {
|
if (!asn1_start_tag(data, ASN1_CONTEXT(0))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!ldap_decode_attribs_bare(r, data, &r[i]->attributes,
|
||||||
ldap_decode_attribs_bare(r, data, &r[i]->attributes,
|
&r[i]->num_attributes)) {
|
||||||
&r[i]->num_attributes);
|
return false;
|
||||||
|
}
|
||||||
if (!asn1_end_tag(data)) {
|
if (!asn1_end_tag(data)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user