[PATCH] libcli: Add a NULL check in dom_sid_string
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Jun 10 05:40:38 MDT 2014
Hi!
Review&push would be appreciated.
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 7a487fad26667d574eefec3513e5d66a66b4302c Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 3 Jun 2014 13:03:56 +0000
Subject: [PATCH] libcli: Add a NULL check in dom_sid_string
Signed-off-by: Volker Lendecke <vl at samba.org>
---
libcli/security/dom_sid.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c
index 90f5401..836979e 100644
--- a/libcli/security/dom_sid.c
+++ b/libcli/security/dom_sid.c
@@ -414,6 +414,9 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
* the length
*/
result = (char *)talloc_memdup(mem_ctx, buf, len+1);
+ if (result == NULL) {
+ return NULL;
+ }
/*
* beautify the talloc_report output
--
1.7.9.5
More information about the samba-technical
mailing list