diff options
author | Jeremy Allison <jra@samba.org> | 2005-05-25 19:25:35 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2005-05-25 19:25:35 +0000 |
commit | b377f87af6e41e04f6c16aa5d624178139e45b03 (patch) | |
tree | 37e2cb7ef06c24aa8b7d2632473df646c2651a2e /source/smbd/reply.c | |
parent | ce485348f7367924381824247ba36015aef9a22d (diff) | |
download | samba-b377f87af6e41e04f6c16aa5d624178139e45b03.tar.gz samba-b377f87af6e41e04f6c16aa5d624178139e45b03.tar.xz samba-b377f87af6e41e04f6c16aa5d624178139e45b03.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/reply.c')
-rw-r--r-- | source/smbd/reply.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 686f54c5e71..1c2e9508367 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -118,6 +118,9 @@ NTSTATUS check_path_syntax(pstring destname, const pstring srcname) } if (!(*s & 0x80)) { + if (*s <= 0x1f) { + return NT_STATUS_OBJECT_NAME_INVALID; + } switch (*s) { case '*': case '?': @@ -244,6 +247,9 @@ NTSTATUS check_path_syntax_wcard(pstring destname, const pstring srcname) } if (!(*s & 0x80)) { + if (*s <= 0x1f) { + return NT_STATUS_OBJECT_NAME_INVALID; + } *d++ = *s++; } else { switch(next_mb_char_size(s)) { |