summaryrefslogtreecommitdiff
path: root/mysys/mf_pack.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-11-22 10:19:31 +0100
committerSergei Golubchik <sergii@pisem.net>2012-11-22 10:19:31 +0100
commita48a91d90f07798deebe514d9d827fb719da7294 (patch)
treec438c045be1f3d8167b3746aa3ac87f848902aeb /mysys/mf_pack.c
parent3a1fdc9e7fc65e29320b988f9a69c8acab168ff9 (diff)
parent13ba0dd286f3296bfbbd202fa76d47770734b472 (diff)
downloadmariadb-git-a48a91d90f07798deebe514d9d827fb719da7294.tar.gz
5.3->5.5 merge
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r--mysys/mf_pack.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c
index 18c9a38f0db..a51d94f8e73 100644
--- a/mysys/mf_pack.c
+++ b/mysys/mf_pack.c
@@ -1,4 +1,5 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2012, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,7 +31,7 @@ void pack_dirname(char * to, const char *from)
int cwd_err;
size_t d_length,length,UNINIT_VAR(buff_length);
char * start;
- char buff[FN_REFLEN];
+ char buff[FN_REFLEN + 1];
DBUG_ENTER("pack_dirname");
(void) intern_filename(to,from); /* Change to intern name */
@@ -127,7 +128,7 @@ size_t cleanup_dirname(register char *to, const char *from)
reg3 char * from_ptr;
reg4 char * start;
char parent[5], /* for "FN_PARENTDIR" */
- buff[FN_REFLEN+1],*end_parentdir;
+ buff[FN_REFLEN + 1],*end_parentdir;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
@@ -241,7 +242,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+1];
+ char buff[FN_REFLEN + 1];
char *pos=strend(dir);
if (dir[0] && pos[-1] != FN_DEVCHAR && my_access(dir, F_OK))
{
@@ -291,7 +292,7 @@ void symdirget(char *dir)
size_t normalize_dirname(char *to, const char *from)
{
size_t length;
- char buff[FN_REFLEN];
+ char buff[FN_REFLEN + 1];
DBUG_ENTER("normalize_dirname");
/*
@@ -418,7 +419,7 @@ static char * expand_tilde(char **path)
size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
- char buff[FN_REFLEN];
+ char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
@@ -448,7 +449,7 @@ size_t system_filename(char *to, const char *from)
char *intern_filename(char *to, const char *from)
{
size_t length, to_length;
- char buff[FN_REFLEN];
+ char buff[FN_REFLEN + 1];
if (from == to)
{ /* Dirname may destroy from */
strmov(buff,from);