Re: Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)
Дата
Msg-id b127ee5a-301c-40bd-6aba-10f507e4cf6f@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)  (Aleksander Alekseev <a.alekseev@postgrespro.ru>)
Список pgsql-hackers
On 3/22/16 9:27 AM, Aleksander Alekseev wrote:
> diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
> index 28f9fb5..45aa802 100644
> --- a/src/backend/libpq/hba.c
> +++ b/src/backend/libpq/hba.c
> @@ -1008,14 +1008,9 @@ parse_hba_line(List *line, int line_num, char *raw_line)
>                  *cidr_slash = '\0';
>  
>              /* Get the IP address either way */
> +            memset(&hints, 0, sizeof(hints));
>              hints.ai_flags = AI_NUMERICHOST;
>              hints.ai_family = AF_UNSPEC;
> -            hints.ai_socktype = 0;
> -            hints.ai_protocol = 0;
> -            hints.ai_addrlen = 0;
> -            hints.ai_canonname = NULL;
> -            hints.ai_addr = NULL;
> -            hints.ai_next = NULL;
>  
>              ret = pg_getaddrinfo_all(str, NULL, &hints, &gai_result);
>              if (ret == 0 && gai_result)

In addition to what Heikki wrote, I think the above is not necessary.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christian Convey
Дата:
Сообщение: Re: WIP: About CMake v2
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix deletion of speculatively inserted TOAST on conflict