summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 15:49:34 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:07:32 -0700
commitc13887defc4c05b6b87f8f40ae0cf981a497f443 (patch)
tree45750aebc286cdbf0e9457c844517096e74d9163 /source3/smbd
parent526e875cec15761099438e17df3f56bc2bd5b761 (diff)
downloadsamba-c13887defc4c05b6b87f8f40ae0cf981a497f443.tar.gz
samba-c13887defc4c05b6b87f8f40ae0cf981a497f443.tar.bz2
samba-c13887defc4c05b6b87f8f40ae0cf981a497f443.zip
Check error returns on strnorm().
Diffstat (limited to 'source3/smbd')
-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;
+ }
}
/*