1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

CVE-2022-32745 s4/dsdb/samldb: Check for empty values array

This avoids potentially trying to access the first element of an empty
array.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15008

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Joseph Sutton 2022-02-16 17:03:10 +13:00 committed by Jule Anger
parent 7270b68386
commit 6237c85565

View File

@ -751,7 +751,7 @@ static int samldb_schema_add_handle_linkid(struct samldb_ctx *ac)
return ret;
}
if (el == NULL) {
if (el == NULL || el->num_values == 0) {
return LDB_SUCCESS;
}
@ -919,7 +919,7 @@ static int samldb_schema_add_handle_mapiid(struct samldb_ctx *ac)
return ret;
}
if (el == NULL) {
if (el == NULL || el->num_values == 0) {
return LDB_SUCCESS;
}