Commit 1e7f0637 authored by Chuck Bell's avatar Chuck Bell

BUG#12929345 : Execution aborts without any messages (Windows only)

This patch adds the length of the buffer in the strncat operation
to prevent buffer overrun. 
parent 0750d88c
......@@ -851,9 +851,9 @@ static int process_options(int argc, char *argv[], char *operation)
strncpy(buff, opt_basedir, sizeof(buff) - 1);
#ifdef __WIN__
strncat(buff, "/", sizeof(buff) - 1);
strncat(buff, "/", sizeof(buff) - strlen(buff) - 1);
#else
strncat(buff, FN_DIRSEP, sizeof(buff) - 1);
strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1);
#endif
buff[sizeof(buff) - 1]= 0;
my_delete(opt_basedir, MYF(0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment