summaryrefslogtreecommitdiff
path: root/mysys/mf_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/mf_format.c')
-rw-r--r--mysys/mf_format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/mf_format.c b/mysys/mf_format.c
index 39084799563..aa4d469e20c 100644
--- a/mysys/mf_format.c
+++ b/mysys/mf_format.c
@@ -53,7 +53,8 @@ my_string fn_format(my_string to, const char *name, const char *dsk,
name+=(length=dirname_part(dev,(startpos=(my_string) name)));
if (length == 0 || flag & 1)
{
- (void) strmov(dev,dsk); /* Use given directory */
+ (void) strnmov(dev,dsk, sizeof(dev) - 2);
+ /* Use given directory */
convert_dirname(dev); /* Fix to this OS */
}
if (flag & 8)