From ab710c9e25c24cc69876279125297b7755304070 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 12 Jun 2006 12:45:06 +0000 Subject: r16153: Fix possible NULL dereference found by Klocwork # 252 (This used to be commit 128260527b90d77ca3dfc900e012018ef00ba9e0) --- source3/lib/ldap_escape.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- cgit