1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

s3: smbd: Fix NULL pointer bug introduced by previous 'raw' stream fix (bug #11522).

Ensure dirpath can never be NULL.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11535

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Oct  1 08:58:36 CEST 2015 on sn-devel-104
This commit is contained in:
Jeremy Allison 2015-09-30 17:12:11 -07:00 committed by Ralph Böhme
parent bec685fb13
commit f9ceaf4439

View File

@ -388,6 +388,12 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
status = map_nt_error_from_unix(errno);
goto err;
}
/* dirpath must exist. */
dirpath = talloc_strdup(ctx,"");
if (dirpath == NULL) {
status = NT_STATUS_NO_MEMORY;
goto err;
}
DEBUG(5, ("conversion finished %s -> %s\n",
orig_path,
smb_fname->base_name));