From: Douglas Bagnall Date: Fri, 3 May 2019 05:21:49 +0000 (+1200) Subject: dsdb/modules/dirsync: avoid possible NULL dereference (CID 1034800) X-Git-Tag: tdb-1.4.1~131 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2852dce541e7d923b1a2807f9ba29b62b043d219;p=thirdparty%2Fsamba.git dsdb/modules/dirsync: avoid possible NULL dereference (CID 1034800) Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer --- diff --git a/source4/dsdb/samdb/ldb_modules/dirsync.c b/source4/dsdb/samdb/ldb_modules/dirsync.c index 291876e162b..6367661bd04 100644 --- a/source4/dsdb/samdb/ldb_modules/dirsync.c +++ b/source4/dsdb/samdb/ldb_modules/dirsync.c @@ -852,6 +852,9 @@ static int dirsync_search_callback(struct ldb_request *req, struct ldb_reply *ar } tmp = strchr(tmp, '/'); + if (tmp == NULL) { + return ldb_operr(ldb); + } tmp++; dn = ldb_dn_new(dsc, ldb, tmp);