summaryrefslogtreecommitdiffstats
path: root/source/smbd/mangle_hash.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-05-25 19:25:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:59 -0500
commit0ca2423c706423a07721e375345b6d45a45cbcf4 (patch)
tree37e2cb7ef06c24aa8b7d2632473df646c2651a2e /source/smbd/mangle_hash.c
parentac0fa973774c36b72863aea369e9d243cf7420fa (diff)
downloadsamba-0ca2423c706423a07721e375345b6d45a45cbcf4.tar.gz
samba-0ca2423c706423a07721e375345b6d45a45cbcf4.tar.xz
samba-0ca2423c706423a07721e375345b6d45a45cbcf4.zip
r6977: Fix bug #2735 (not mangling control characters) plus
ensure we don't create files with control characters either. Jeremy.
Diffstat (limited to 'source/smbd/mangle_hash.c')
-rw-r--r--source/smbd/mangle_hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c
index fee386d6db9..871702623a8 100644
--- a/source/smbd/mangle_hash.c
+++ b/source/smbd/mangle_hash.c
@@ -95,6 +95,10 @@ static NTSTATUS has_illegal_chars(const smb_ucs2_t *s, BOOL allow_wildcards)
}
while (*s) {
+ if (*s <= 0x1f) {
+ /* Control characters. */
+ return NT_STATUS_UNSUCCESSFUL;
+ }
switch(*s) {
case UCS2_CHAR('\\'):
case UCS2_CHAR('/'):