git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad26b4e
)
ldb_tdb: Refuse to load a GUID index that is not a multiple of 16 bytes
author
Andrew Bartlett
<abartlet@samba.org>
Fri, 25 Aug 2017 03:33:14 +0000
(15:33 +1200)
committer
Andrew Bartlett
<abartlet@samba.org>
Fri, 22 Sep 2017 19:20:21 +0000
(21:20 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_index.c
patch
|
blob
|
history
diff --git
a/lib/ldb/ldb_tdb/ldb_index.c
b/lib/ldb/ldb_tdb/ldb_index.c
index c3458e89db46fed1601076da3e01644837d69f54..dc33217aea9f0f15643103dd7596b3ff3c095316 100644
(file)
--- a/
lib/ldb/ldb_tdb/ldb_index.c
+++ b/
lib/ldb/ldb_tdb/ldb_index.c
@@
-226,6
+226,10
@@
normal_index:
return LDB_ERR_OPERATIONS_ERROR;
}
+ if ((el->values[0].length % GUID_val_size) != 0) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
list->count = el->values[0].length / GUID_val_size;
list->dn = talloc_array(list, struct ldb_val, list->count);