s3: smbd: fix a crash in unix_convert()
[metze/samba/wip.git] / source3 / smbd / filename.c
index 3ed60e26a0170fb3615c6188e144d8c6f052dabe..48814a5790258a3bedd304131656b9a2fe0dfe6a 100644 (file)
@@ -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 {