mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
libcli/ldap: Don’t try to encode NULL name
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
40b529f8dd
commit
d6a6dcc0c6
@ -546,6 +546,9 @@ _PUBLIC_ bool ldap_encode(struct ldap_message *msg,
|
||||
for (i=0; i<r->num_attributes; i++) {
|
||||
struct ldb_message_element *attrib = &r->attributes[i];
|
||||
if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) goto err;
|
||||
if (attrib->name == NULL) {
|
||||
goto err;
|
||||
}
|
||||
if (!asn1_write_OctetString(data, attrib->name,
|
||||
strlen(attrib->name))) goto err;
|
||||
if (!asn1_push_tag(data, ASN1_SET)) goto err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user