mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
46ae5568fa
Fix the following error observed running samba.test.registry compiled with clang-17 and UBsan: lib/ldb/common/ldb_ldif.c:881:9: runtime error: applying non-zero offset 137438953440 to null pointer #0 0x7faa0eb3932f in ldb_ldif_read lib/ldb/common/ldb_ldif.c:881 #1 0x7faa0eb3aec6 in ldb_ldif_read_string lib/ldb/common/ldb_ldif.c:1004 #2 0x7faa077ed759 in dsdb_set_schema_from_ldif source4/dsdb/schema/schema_set.c:1113 #3 0x7faa068fcbbf in py_dsdb_set_schema_from_ldif source4/dsdb/pydsdb.c:929 #4 0x7faa1d1d4507 in cfunction_call (/lib64/libpython3.11.so.1.0+0x1d4507) [... a lot of Python calls skipped...] I.e. number of elements should be checked against zero before making an attempt to access an element by index. Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> |
||
---|---|---|
.. | ||
attrib_handlers.c | ||
ldb_attributes.c | ||
ldb_controls.c | ||
ldb_debug.c | ||
ldb_dn.c | ||
ldb_ldif.c | ||
ldb_match.c | ||
ldb_modules.c | ||
ldb_msg.c | ||
ldb_options.c | ||
ldb_pack.c | ||
ldb_parse.c | ||
ldb_utf8.c | ||
ldb.c | ||
qsort.c |