diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-05-09 02:03:35 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-05-09 02:03:35 +0400 |
commit | 5ef2bdea81a68a5440235bb5c841fff5dcc2b2c7 (patch) | |
tree | faf6e2793eae5ff3a0ec48cebf47e8045db0a6ff /mysys/mf_loadpath.c | |
parent | e94c1ab135e035dea4c2db9508d2d635b70bcf80 (diff) | |
parent | 721ec081901b661b9338a47b3144c6c41829165a (diff) | |
download | mariadb-git-5ef2bdea81a68a5440235bb5c841fff5dcc2b2c7.tar.gz |
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts:
Text conflict in mysql-test/r/grant.result
Text conflict in mysql-test/t/grant.test
Text conflict in mysys/mf_loadpath.c
Text conflict in sql/slave.cc
Text conflict in sql/sql_priv.h
Diffstat (limited to 'mysys/mf_loadpath.c')
-rw-r--r-- | mysys/mf_loadpath.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mysys/mf_loadpath.c b/mysys/mf_loadpath.c index fbf6f7f5d57..07851ab6e92 100644 --- a/mysys/mf_loadpath.c +++ b/mysys/mf_loadpath.c @@ -34,7 +34,7 @@ char * my_load_path(char * to, const char *path, if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) || test_if_hard_path(path)) - (void) strmov(buff,path); + (void) strnmov(buff, path, FN_REFLEN); else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) || (is_prefix(path,FN_PARENTDIR)) || ! own_path_prefix) @@ -42,13 +42,14 @@ char * my_load_path(char * to, const char *path, if (is_cur) is_cur=2; /* Remove current dir */ if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0))) - (void) strcat(buff,path+is_cur); + (void) strncat(buff, path+is_cur, FN_REFLEN); else - (void) strmov(buff,path); /* Return org file name */ + (void) strnmov(buff, path, FN_REFLEN); /* Return org file name */ } else - (void) strxmov(buff,own_path_prefix,path,NullS); - strmov(to,buff); + (void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS); + strnmov(to, buff, FN_REFLEN); + to[FN_REFLEN-1]= '\0'; DBUG_PRINT("exit",("to: %s",to)); DBUG_RETURN(to); } /* my_load_path */ |