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:40:10 +0200 |
commit | d69db571442f170a2c2538f206590f48f2de97c2 (patch) | |
tree | fd0c425826373c1c20f5f5431706e8a1f4ffccb1 /source3 | |
parent | 2df7b85433bddf2dd28c6b7ed3dc94970ef40e36 (diff) | |
download | samba-d69db571442f170a2c2538f206590f48f2de97c2.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)
Diffstat (limited to 'source3')
-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 d610cf1b6bb..aeda9528993 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 { |