Fix out-of-bounds writes on long maxadmin commands
If a maxadmin command had more than the maximum amount of arguments, the buffer used to store the split arguments would overflow.
This commit is contained in:
@ -1753,7 +1753,7 @@ execute_cmd(CLI_SESSION *cli)
|
|||||||
{
|
{
|
||||||
DCB *dcb = cli->session->client_dcb;
|
DCB *dcb = cli->session->client_dcb;
|
||||||
int argc, i, j, found = 0;
|
int argc, i, j, found = 0;
|
||||||
char *args[MAXARGS + 1];
|
char *args[MAXARGS + 4];
|
||||||
int in_quotes = 0, escape_next = 0;
|
int in_quotes = 0, escape_next = 0;
|
||||||
char *ptr, *lptr;
|
char *ptr, *lptr;
|
||||||
bool in_space = false;
|
bool in_space = false;
|
||||||
|
Reference in New Issue
Block a user