summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/mangle_hash2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index e2c4b43bc3..9d64728c7a 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -202,13 +202,13 @@ static BOOL is_mangled_component(const char *name)
M_DEBUG(0,("is_mangled_component %s ?\n", name));
- /* the best distinguishing characteristic is the ~ */
- if (name[6] != '~') return False;
-
/* check the length */
len = strlen(name);
if (len > 12 || len < 8) return False;
+ /* the best distinguishing characteristic is the ~ */
+ if (len > 7 && name[6] != '~') return False;
+
/* check extension */
if (len > 8) {
if (name[8] != '.') return False;