summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/trans2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 84d9b1cc17..4c06377bda 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -684,7 +684,7 @@ static int call_trans2findfirst(char *inbuf, char *outbuf, int bufsize, int cnum
pstrcpy( expnd, p+1 );
*p++ = '*';
*p = '.';
- safe_strcpy( p+1, expnd, p - mask - 1);
+ safe_strcpy( p+1, expnd, sizeof(mask) - (p - mask) - 2);
} else
*p = '*';
}