Fix debug argument concatenation
The buffer was shorter than the arguments given to it which caused a heap buffer overflow.
This commit is contained in:
@ -3322,7 +3322,7 @@ static bool handle_debug_args(char* args)
|
|||||||
size_t total_len = 1;
|
size_t total_len = 1;
|
||||||
for (int i = 0; debug_arguments[i].action != NULL; i++)
|
for (int i = 0; debug_arguments[i].action != NULL; i++)
|
||||||
{
|
{
|
||||||
total_len += strlen(debug_arguments[i].name) + 1;
|
total_len += strlen(debug_arguments[i].name) + 2;
|
||||||
}
|
}
|
||||||
char arglist[total_len];
|
char arglist[total_len];
|
||||||
arglist[0] = '\0';
|
arglist[0] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user