From 75f109bc81c0ff0d714070b3f324bce62c2f3984 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 25 May 2005 19:25:35 +0000 Subject: r6977: Fix bug #2735 (not mangling control characters) plus ensure we don't create files with control characters either. Jeremy. (This used to be commit 0ca2423c706423a07721e375345b6d45a45cbcf4) --- source3/smbd/mangle_hash2.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/smbd/mangle_hash2.c') diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c index 6a8462ee3d..4325c07f58 100644 --- a/source3/smbd/mangle_hash2.c +++ b/source3/smbd/mangle_hash2.c @@ -633,6 +633,11 @@ static void init_tables(void) memset(char_flags, 0, sizeof(char_flags)); for (i=1;i<128;i++) { + if (i <= 0x1f) { + /* Control characters. */ + char_flags[i] |= FLAG_ILLEGAL; + } + if ((i >= '0' && i <= '9') || (i >= 'a' && i <= 'z') || (i >= 'A' && i <= 'Z')) { -- cgit