From d4e8fd5fd246a80e1a13a2bf3965d0335d4dc2c4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 7 Aug 2018 22:50:52 +0200 Subject: [PATCH] smbd: Fix CID 1438245 Dereference before null check BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/nttrans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index bad904b9eb8..68470766f77 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -2459,7 +2459,7 @@ static enum ndr_err_code extract_sids_from_buf(TALLOC_CTX *mem_ctx, } } *sids = talloc_zero_array(mem_ctx, struct dom_sid, i); - if (!sids) { + if (*sids == NULL) { DBG_ERR("OOM\n"); err = NDR_ERR_ALLOC; goto done; -- 2.47.2