This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] resolv: Do not copy IPv4 addresses to IPv6 address array
On 07/04/2017 08:05 PM, Carlos O'Donell wrote:
> On 07/04/2017 12:53 PM, Andreas Schwab wrote:
>> On Jul 04 2017, Carlos O'Donell <carlos@redhat.com> wrote:
>>
>>> A design that puts malloc'd pointers directly into _res is not a good idea
>>> for the reasons you note. I agree with your solution.
>>
>> That's what we do.
>
> And it's not a good idea.
I didn't realize that res_send.c also allocated name server addresses
for IPv4 servers. I assumed there weren't any allocations at all for
IPv4 addresses because __res_vinit does not perform such allocations.
These allocations are really old. It suggests that we perhaps could
have used a more direct mechanism for storing the pointer to the
extended configuration.
Thanks,
Florian