summaryrefslogtreecommitdiff
path: root/mysys/mf_pack.c
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-12-18 16:44:24 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-12-18 16:44:24 -0200
commit61ae92889808c3c38c5e449e36fc30f89e8e3f23 (patch)
tree8cb3e4210dd5da0c3cec217f0e5008ee9104715b /mysys/mf_pack.c
parentf815246486444ca2dc5d408099439e1d973d3a7b (diff)
parent06a1df91813ea2c39f7312bcf8af972c7e8a926f (diff)
downloadmariadb-git-61ae92889808c3c38c5e449e36fc30f89e8e3f23.tar.gz
Manual merge.
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r--mysys/mf_pack.c4
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])) ;