diff options
-rw-r--r-- | source3/lib/ldap_escape.c | 4 |
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) { |