freeaddrinfo2 changes.

From: Kurt Roeckx <Q(at)ping(dot)be>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: freeaddrinfo2 changes.
Date: 2003-06-09 12:29:29
Message-ID: 20030609122929.GA30524@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just saw in the cvs web that you changed freeaddrinfo2 to not
have the hint af anymore, and use the one from the struct addrinfo
itself.

This can break things. If you called getaddrinfo2() with
AF_UNSPEC, the version from the system can return an AF_UNIX
socket. For instance glibc 2.1 will do that.

The reason freeaddrinfo2 had the hint_ai_family is because that's
how you know we called getaddrinfo_unix, and we allocated the
memory ourself there.

Could you please reverse that change?

Kurt

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2003-06-09 13:50:05 Re: security flaw
Previous Message Andrew Piskorski 2003-06-09 12:21:23 native bi-temporal support?