Date: Tue, 3 Nov 2020 11:13:12 +0100 From: Hans Petter Selasky <hps@selasky.org> To: xtouqh@hotmail.com, hackers@freebsd.org Subject: Re: KASSERT(val != 0) not triggering in linux_errno.c reading outside of array Message-ID: <c87d3aef-7a66-48bb-ca9e-fe4ae4e9f1d3@selasky.org> In-Reply-To: <AM0PR06MB398671E9C991E0A1B4223660C0110@AM0PR06MB3986.eurprd06.prod.outlook.com> References: <AM0PR06MB39867F0AE62A737D2EE596F5C0110@AM0PR06MB3986.eurprd06.prod.outlook.com> <77d2eef0-9cc8-aa39-6d28-a7fb41e233ac@selasky.org> <AM0PR06MB398671E9C991E0A1B4223660C0110@AM0PR06MB3986.eurprd06.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Should: for (i = 1; i < sizeof(linux_errtbl); i++) { Be: for (i = 1; i < sizeof(linux_errtbl)/sizeof(linux_errtbl[0]); i++) { Or: for (i = 1; i < (int)nitems(linux_errtbl); i++) { --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c87d3aef-7a66-48bb-ca9e-fe4ae4e9f1d3>