Date: Thu, 16 Jan 2020 08:27:31 +0000 (UTC) From: Eugene Grosbein <eugen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r356780 - stable/10/usr.sbin/arp Message-ID: <202001160827.00G8RVRI066900@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eugen Date: Thu Jan 16 08:27:30 2020 New Revision: 356780 URL: https://svnweb.freebsd.org/changeset/base/356780 Log: MFC r356551: arp(8): avoid segfaulting due to out-of-bounds memory access Fix obvious mistake that sometimes results in reading memory past end of an array. PR: 242784 Modified: stable/10/usr.sbin/arp/arp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/arp/arp.c ============================================================================== --- stable/10/usr.sbin/arp/arp.c Thu Jan 16 08:16:12 2020 (r356779) +++ stable/10/usr.sbin/arp/arp.c Thu Jan 16 08:27:30 2020 (r356780) @@ -607,8 +607,7 @@ print_entry(struct sockaddr_dl *sdl, } else printf("(incomplete)"); - for (p = ifnameindex; p && ifnameindex->if_index && - ifnameindex->if_name; p++) { + for (p = ifnameindex; p && p->if_index && p->if_name; p++) { if (p->if_index == sdl->sdl_index) { printf(" on %s", p->if_name); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001160827.00G8RVRI066900>