summaryrefslogtreecommitdiff
path: root/source3/smbd/filename.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r--source3/smbd/filename.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index a4f9cd1bf6..0be566f897 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -323,7 +323,11 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
if (conn->case_sensitive && !conn->case_preserve &&
!conn->short_case_preserve) {
- strnorm(smb_fname->base_name, lp_defaultcase(SNUM(conn)));
+ if (!strnorm(smb_fname->base_name, lp_defaultcase(SNUM(conn)))) {
+ DEBUG(0, ("strnorm %s failed\n", smb_fname->base_name));
+ status = NT_STATUS_INVALID_PARAMETER;
+ goto err;
+ }
}
/*
@@ -740,8 +744,13 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
(mangle_is_8_3(start, False,
conn->params) &&
!conn->short_case_preserve)) {
- strnorm(start,
- lp_defaultcase(SNUM(conn)));
+ if (!strnorm(start,
+ lp_defaultcase(SNUM(conn)))) {
+ DEBUG(0, ("strnorm %s failed\n",
+ start));
+ status = NT_STATUS_INVALID_PARAMETER;
+ goto err;
+ }
}
/*