[PATCH] inet: make ether_aton() reject garbage after the address
Florian Weimer
fweimer@redhat.com
Mon Jul 29 12:03:43 GMT 2024
* Miklós Máté:
> On 29/07/2024 13:12, Andreas Schwab wrote:
>> What is the rationale?
>>
> The rationale is that e.g. "a:b:c:d:e:ffx" should not be accepted as a
> valid MAC address. Other conversion functions, e.g., inet_pton()
> reject the input if there is garbage after the address.
However, inet_aton does not, where is is coming from. See
resolv/tst-inet_aton_exact.c.
We should move off this behavior because it is really surprising. I
think for ether_aton, we can do it without introducing a compatibility
symbol.
Andreas, what do you think?
Thanks,
Florian
More information about the Libc-alpha
mailing list