summaryrefslogtreecommitdiff
path: root/mysys/mf_format.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-17 19:42:34 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-17 19:42:34 +0200
commit07315d36030bd1cbe6acfeb3e8f60c49ba876a10 (patch)
tree9c74de4bb97507ece945576df7073a7a28f07674 /mysys/mf_format.c
parent4656060f118caba30912cca2557d72fcea307283 (diff)
downloadmariadb-git-07315d36030bd1cbe6acfeb3e8f60c49ba876a10.tar.gz
strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)
with a bit of lame protection against abuse.
Diffstat (limited to 'mysys/mf_format.c')
-rw-r--r--mysys/mf_format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/mf_format.c b/mysys/mf_format.c
index 2b2356c08df..d20ce882459 100644
--- a/mysys/mf_format.c
+++ b/mysys/mf_format.c
@@ -46,7 +46,7 @@ char * fn_format(char * to, const char *name, const char *dir,
else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev))
{
/* Put 'dir' before the given path */
- strmake(buff,dev,sizeof(buff)-1);
+ strmake_buf(buff, dev);
pos=convert_dirname(dev,dir,NullS);
strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev));
}