mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
ldb_mod_op_test: Fix core dump on ldb_case_attrs_index_test_teardown
With no schema syntax, this would occasionally crash as it dereferenced some possibly NULL sequence of memory. Note: Removing all tests except this one, made it crash reliably. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
242cf337e9
commit
c4c64ff51f
@ -2587,6 +2587,14 @@ static void test_ldb_attrs_index_handler(void **state)
|
||||
syntax, &cn_attr_2);
|
||||
assert_int_equal(ret, LDB_SUCCESS);
|
||||
|
||||
syntax = ldb_standard_syntax_by_name(ldb, LDB_SYNTAX_OCTET_STRING);
|
||||
assert_non_null(syntax);
|
||||
|
||||
ret = ldb_schema_attribute_fill_with_syntax(ldb, ldb,
|
||||
"", 0,
|
||||
syntax, &default_attr);
|
||||
assert_int_equal(ret, LDB_SUCCESS);
|
||||
|
||||
/*
|
||||
* Set an attribute handler
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user