Date: Fri, 26 Jan 2018 09:38:40 +0000 (UTC) From: Wojciech Macek <wma@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328435 - head/sys/powerpc/powerpc Message-ID: <201801260938.w0Q9cebW054853@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wma Date: Fri Jan 26 09:38:40 2018 New Revision: 328435 URL: https://svnweb.freebsd.org/changeset/base/328435 Log: PPC: Add place for NULL chars in intrnames In a corner case we could fall into OOB error. Authored by: Patryk Duda <pdk@semihalf.com> Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: IBM, QCM Technologies Modified: head/sys/powerpc/powerpc/intr_machdep.c Modified: head/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/intr_machdep.c Fri Jan 26 08:52:28 2018 (r328434) +++ head/sys/powerpc/powerpc/intr_machdep.c Fri Jan 26 09:38:40 2018 (r328435) @@ -130,7 +130,7 @@ static u_int nirqs = 0; /* Allocated IRQs. */ static u_int stray_count; u_long intrcnt[INTR_VECTORS]; -char intrnames[INTR_VECTORS * MAXCOMLEN]; +char intrnames[INTR_VECTORS * (MAXCOMLEN + 1)]; size_t sintrcnt = sizeof(intrcnt); size_t sintrnames = sizeof(intrnames);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801260938.w0Q9cebW054853>