diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-12-18 16:44:24 -0200 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-12-18 16:44:24 -0200 |
commit | 26f1a8ead26e632df20fa03f3a421aa1b37774da (patch) | |
tree | 8cb3e4210dd5da0c3cec217f0e5008ee9104715b /mysys/mf_pack.c | |
parent | 5f3b645b1e8568e42358be5bc327920ad3b57c97 (diff) | |
parent | b9380f0e76b34af223c4ef0b4fe648ddca47a59c (diff) | |
download | mariadb-git-26f1a8ead26e632df20fa03f3a421aa1b37774da.tar.gz |
Manual merge.
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r-- | mysys/mf_pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
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])) ; |