Use constant sized arrays for some service strings
The `user`, `password`, `version_string` and `weightby` values should be allocated as a part of the service structure. This allows them to be modified at runtime without having to worry about memory allocation problems. Although this removes the problem of reallocation, it still does not make the updating of the strings thread-safe. This can cause invalid values to be read from the service strings.
This commit is contained in:
@ -911,7 +911,7 @@ static void server_parameter_free(SERVER_PARAM *tofree)
|
||||
* @return The parameter value or NULL if not found
|
||||
*/
|
||||
const char *
|
||||
server_get_parameter(const SERVER *server, char *name)
|
||||
server_get_parameter(const SERVER *server, const char *name)
|
||||
{
|
||||
SERVER_PARAM *param = server->parameters;
|
||||
|
||||
|
Reference in New Issue
Block a user