Remove usage of strcat, since OpenBSD does not like that.
This commit is contained in:
parent
12ce522a6d
commit
24b98358d3
@ -64,6 +64,7 @@ static enum command_parse_status command_extract_arguments(struct hub_info* hub,
|
||||
char* token = NULL;
|
||||
char* tmp = NULL;
|
||||
size_t size = 0;
|
||||
size_t offset = 0;
|
||||
struct hub_command_arg_data* data = NULL;
|
||||
enum command_parse_status status = cmd_status_ok;
|
||||
|
||||
@ -82,9 +83,10 @@ static enum command_parse_status command_extract_arguments(struct hub_info* hub,
|
||||
|
||||
while ((tmp = list_get_first(tokens)))
|
||||
{
|
||||
if (*token)
|
||||
strcat(token, " ");
|
||||
strcat(token, tmp);
|
||||
if (offset > 0)
|
||||
token[offset++] = ' ';
|
||||
memcpy(token + offset, tmp, strlen(tmp));
|
||||
offset += strlen(tmp);
|
||||
list_remove(tokens, tmp);
|
||||
hub_free(tmp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user