summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/mangle_hash2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index 351461f11f..e0efb3e41b 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -219,7 +219,7 @@ static BOOL is_mangled_component(const char *name, size_t len)
if (len > 8) {
if (name[8] != '.')
return False;
- for (i=9; name[i]; i++) {
+ for (i=9; name[i] && i < len; i++) {
if (! FLAG_CHECK(name[i], FLAG_ASCII)) {
return False;
}