Ensure SSL_LISTENER structure is intialised to binary zero when allocated in configuration processing by using calloc instead of malloc.

This commit is contained in:
counterpoint
2016-03-04 11:53:54 +00:00
parent 739fe7039c
commit 768ff24428

View File

@ -1038,7 +1038,7 @@ make_ssl_structure (CONFIG_CONTEXT *obj, bool require_cert, int *error_count)
ssl = config_get_value(obj->parameters, "ssl");
if (ssl && !strcmp(ssl, "required"))
{
if ((new_ssl = malloc(sizeof(SSL_LISTENER))) == NULL)
if ((new_ssl = calloc(1, sizeof(SSL_LISTENER))) == NULL)
{
return NULL;
}