diff options
author | Ralph Boehme <slow@samba.org> | 2015-09-25 21:06:57 +0200 |
---|---|---|
committer | Ralph Böhme <slow@samba.org> | 2015-10-01 05:56:10 +0200 |
commit | bec685fb13e7cbe3bb98e5647183720d31f1c522 (patch) | |
tree | 435734876e9b232680efcef7f4499655ba61d496 /source3/smbd/filename.c | |
parent | 00954a975b45cdb0dcf08c25850d2be26efabe48 (diff) | |
download | samba-bec685fb13e7cbe3bb98e5647183720d31f1c522.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>
Diffstat (limited to 'source3/smbd/filename.c')
-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 { |