ldb: Avoid read beyond buffer
authorMichael Hanselmann <public@hansmi.ch>
Thu, 11 Apr 2019 22:46:37 +0000 (00:46 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 May 2019 07:12:11 +0000 (07:12 +0000)
commit7f48fbcf7bad06a6df7812bb4fd3b0fca8edb4ea
tree68f2ce68c74850c0c7849c53686e341e4506068b
parent0ae585db26727a944c957cb543bf72175dc55599
ldb: Avoid read beyond buffer

Calling the "ldb_parse_tree" function with a filter consisting of
exactly a single space (" ") would trigger a read beyond the input
buffer. A unittest is included.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13900

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
lib/ldb/common/ldb_parse.c
lib/ldb/tests/ldb_parse_test.c [new file with mode: 0644]
lib/ldb/wscript