summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-06-12 12:45:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:23 -0500
commitab710c9e25c24cc69876279125297b7755304070 (patch)
tree89ff44e9a14ac8dc69ea0d8d8ddac63b5f247949
parent780f121462b91c520c5a1bd13e7fcde288e1fad2 (diff)
downloadsamba-ab710c9e25c24cc69876279125297b7755304070.tar.gz
samba-ab710c9e25c24cc69876279125297b7755304070.tar.bz2
samba-ab710c9e25c24cc69876279125297b7755304070.zip
r16153: Fix possible NULL dereference found by Klocwork # 252
(This used to be commit 128260527b90d77ca3dfc900e012018ef00ba9e0)
-rw-r--r--source3/lib/ldap_escape.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/ldap_escape.c b/source3/lib/ldap_escape.c
index 3feb0e0c44..fcb787e9e8 100644
--- a/source3/lib/ldap_escape.c
+++ b/source3/lib/ldap_escape.c
@@ -40,6 +40,10 @@ char *escape_ldap_string_alloc(const char *s)
const char *sub;
int i = 0;
char *p = output;
+
+ if (output == NULL) {
+ return NULL;
+ }
while (*s)
{