mirror of https://git.48k.eu/ogserver
rest: replace strcat with strncat in og_set_client_mode
Improve string handling security by replacing strcat with the more secure strncat.master
parent
d6284b6138
commit
59ccaaebf6
|
@ -1355,7 +1355,8 @@ static int og_set_client_mode(struct og_dbi *dbi, const char *mac,
|
|||
dbi_result_next_row(result);
|
||||
|
||||
for (i = 1; i <= dbi_result_get_numfields(result); ++i)
|
||||
strcat(params, dbi_result_get_string_idx(result, i));
|
||||
strncat(params, dbi_result_get_string_idx(result, i),
|
||||
sizeof(params) - strlen(params) - 1);
|
||||
|
||||
dbi_result_free(result);
|
||||
|
||||
|
|
Loading…
Reference in New Issue