diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-02-05 15:05:37 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-02-05 15:05:37 +0300 |
commit | a45ea00b32a71ef5d123e102a7379f7d79a3dbbb (patch) | |
tree | 0bf2d7fce335a1c38da55def00c6bfc5304db2ee /mysys | |
parent | ad935d47088485c59e6425347307b7b908790e3d (diff) | |
parent | 619037517f6827131f0f6367df57e28d1b695626 (diff) | |
download | mariadb-git-a45ea00b32a71ef5d123e102a7379f7d79a3dbbb.tar.gz |
Manual merge from mysql-next-mr.
Conflicts:
- sql/sys_vars.cc
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/default.c | 2 | ||||
-rw-r--r-- | mysys/mf_pack.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mysys/default.c b/mysys/default.c index 8c7dfe12047..4a0f1c6f009 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -683,7 +683,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler, int recursion_level) { char name[FN_REFLEN + 10], buff[4096], curr_gr[4096], *ptr, *end, **tmp_ext; - char *value, option[4096], tmp[FN_REFLEN]; + char *value, option[4096+2], tmp[FN_REFLEN]; static const char includedir_keyword[]= "includedir"; static const char include_keyword[]= "include"; const int max_recursion_level= 10; diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index 9775a842b18..c13a5581b80 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -245,7 +245,7 @@ my_bool my_use_symdir=0; /* Set this if you want to use symdirs */ #ifdef USE_SYMDIR void symdirget(char *dir) { - char buff[FN_REFLEN]; + char buff[FN_REFLEN+1]; char *pos=strend(dir); if (dir[0] && pos[-1] != FN_DEVCHAR && my_access(dir, F_OK)) { @@ -257,7 +257,7 @@ void symdirget(char *dir) *pos++=temp; *pos=0; /* Restore old filename */ if (file >= 0) { - if ((length= my_read(file, buff, sizeof(buff), MYF(0))) > 0) + if ((length= my_read(file, buff, sizeof(buff) - 1, MYF(0))) > 0) { for (pos= buff + length ; pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ; |