diff options
author | Ralph Boehme <slow@samba.org> | 2015-09-25 21:06:57 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-10-05 09:41:29 +0200 |
commit | d0e2a341ac2e117fb9961d9ae4b2acc94b9b73aa (patch) | |
tree | cda60aa740882470212ee2e7add50e1ad43cd643 | |
parent | 3cea564cd98959098144d1f77a617076b203bece (diff) | |
download | samba-d0e2a341ac2e117fb9961d9ae4b2acc94b9b73aa.tar.gz |
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit bec685fb13e7cbe3bb98e5647183720d31f1c522)
-rw-r--r-- | source3/smbd/filename.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |