From d0e2a341ac2e117fb9961d9ae4b2acc94b9b73aa Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 25 Sep 2015 21:06:57 +0200 Subject: s3: smbd: fix a crash in unix_convert() Some error code paths may result in dirpath being NULL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11535 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit bec685fb13e7cbe3bb98e5647183720d31f1c522) --- source3/smbd/filename.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 3ed60e26a01..48814a57902 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -1013,7 +1013,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, return NT_STATUS_OK; fail: DEBUG(10, ("dirpath = [%s] start = [%s]\n", dirpath, start)); - if (*dirpath != '\0') { + if (dirpath && *dirpath != '\0') { smb_fname->base_name = talloc_asprintf(smb_fname, "%s/%s", dirpath, start); } else { -- cgit v1.2.1