From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Chapman Flack <chap(at)anastigmatix(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure) |
Date: | 2016-08-18 19:35:17 |
Message-ID: | b127ee5a-301c-40bd-6aba-10f507e4cf6f@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2016-08-18 19:39:46 | Re: [COMMITTERS] pgsql: Fix deletion of speculatively inserted TOAST on conflict |
Previous Message | Christian Convey | 2016-08-18 19:30:34 | Re: WIP: About CMake v2 |