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:
parent
7270b68386
commit
6237c85565
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user