diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-04-03 21:35:51 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-04-03 21:35:51 +0400 |
commit | 7320a95808197d1e843c0241e5d845bd98a8097d (patch) | |
tree | 4c53541bd85faea4f3fca21d63e1f8880d3c9189 /mysys | |
parent | 0b18b79846916e1eb461f1e91fc95e2dbec60c7a (diff) | |
parent | d53e3625cd9000b8c542fa568a6255cb22592ac5 (diff) | |
download | mariadb-git-7320a95808197d1e843c0241e5d845bd98a8097d.tar.gz |
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:
Text conflict in mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
Text conflict in sql/log.cc
Text conflict in sql/set_var.cc
Text conflict in sql/sql_class.cc
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_pack.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index c13a5581b80..4f7cd90e8aa 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -311,6 +311,9 @@ size_t normalize_dirname(char *to, const char *from) #endif buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/') { + /* we need reserve 2 bytes for the trailing slash and the zero */ + if (length >= sizeof (buff) - 1) + length= sizeof (buff) - 2; buff[length]= FN_LIBCHAR; buff[length + 1]= '\0'; } |