mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
better use of fn_format() in ha_mysisam::restore() and ha_myisam::backup()
fixed buffer overflow in fn_format() mysys/mf_format.c: fixed coredump when dsk overflows sql/ha_myisam.cc: switched from my own pointer black magic in forming a file name to use the functionionality of fn_format()
This commit is contained in:
parent
ce6b0d0721
commit
904655e6d2
2 changed files with 11 additions and 26 deletions
|
|
@ -53,7 +53,8 @@ my_string fn_format(my_string to, const char *name, const char *dsk,
|
|||
name+=(length=dirname_part(dev,(startpos=(my_string) name)));
|
||||
if (length == 0 || flag & 1)
|
||||
{
|
||||
(void) strmov(dev,dsk); /* Use given directory */
|
||||
(void) strnmov(dev,dsk, sizeof(dev) - 2);
|
||||
/* Use given directory */
|
||||
convert_dirname(dev); /* Fix to this OS */
|
||||
}
|
||||
if (flag & 8)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue