This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [hurd,commited] hurd: Fix buffer overrun in __if_nametoindex
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 3 Apr 2018 19:27:32 +0000
- Subject: Re: [hurd,commited] hurd: Fix buffer overrun in __if_nametoindex
- References: <20180403160818.4652-1-samuel.thibault@ens-lyon.org>
On Tue, 3 Apr 2018, Samuel Thibault wrote:
> and building with mainline GCC which reports it.
>
> * sysdeps/mach/hurd/if_index.c (__if_nametoindex): Always end
> ifr.fr_name with a NUL caracter.
Are you sure this truncation is correct? The conclusion we reached for
the Linux version was to check for a too-big length and return an ENODEV
error in that case, instead.
--
Joseph S. Myers
joseph@codesourcery.com