This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [hurd,commited] hurd: Make __if_nametoindex return ENODEV if ifname is too long
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: libc-alpha at sourceware dot org, bug-hurd at gnu dot org
- Date: Wed, 4 Apr 2018 00:03:20 +0200
- Subject: Re: [hurd,commited] hurd: Make __if_nametoindex return ENODEV if ifname is too long
- References: <20180403211458.12717-1-samuel.thibault@ens-lyon.org> <87sh8c3rvd.fsf@linux-m68k.org>
Andreas Schwab, on mar. 03 avril 2018 23:24:54 +0200, wrote:
> On Apr 03 2018, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> > + strncpy (ifr.ifr_name, ifname, IFNAMESIZ - 1);
>
> That leaves ifr.ifr_name[IFNAMESIZ - 1] uninitialized.
D'oh...
If I wasn't seemingly all alone actually working on patches for the Hurd
port, I'd tend to have more time to take care...
Thanks,
Samuel