From: Volker Lendecke Date: Thu, 2 Jan 2020 11:41:16 +0000 (+0100) Subject: auth3: Check for talloc failure X-Git-Tag: ldb-2.1.0~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2f070349326bbdb69415524f0a9fa8d54c18049;p=thirdparty%2Fsamba.git auth3: Check for talloc failure Signed-off-by: Volker Lendecke Reviewed-by: Gary Lockyer --- diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 3b523c0fa18..ccda7118c7d 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -97,6 +97,10 @@ NTSTATUS auth_get_ntlm_challenge(struct auth_context *auth_context, generate_random_buffer(tmp, sizeof(tmp)); auth_context->challenge = data_blob_talloc(auth_context, tmp, sizeof(tmp)); + if (auth_context->challenge.data == NULL) { + DBG_WARNING("data_blob_talloc failed\n"); + return NT_STATUS_NO_MEMORY; + } auth_context->challenge_set_by = "random";