git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4eb4e6
)
CVE-2022-32745 s4/dsdb/samldb: Check for empty values array
author
Joseph Sutton
<josephsutton@catalyst.net.nz>
Wed, 16 Feb 2022 04:03:10 +0000
(17:03 +1300)
committer
Jule Anger
<janger@samba.org>
Wed, 27 Jul 2022 10:52:36 +0000
(10:52 +0000)
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>
source4/dsdb/samdb/ldb_modules/samldb.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/samdb/ldb_modules/samldb.c
b/source4/dsdb/samdb/ldb_modules/samldb.c
index b89d93910fd24927daf7a1b6b33a4dc715bdb509..3ecbd00e68e26fab1a6b82157b71a20578cf35bb 100644
(file)
--- a/
source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/
source4/dsdb/samdb/ldb_modules/samldb.c
@@
-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;
}