svn commit: r328435 - head/sys/powerpc/powerpc
Wojciech Macek
wma at FreeBSD.org
Fri Jan 26 09:38:41 UTC 2018
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 at semihalf.com>
Submitted by: Wojciech Macek <wma at 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);
More information about the svn-src-all
mailing list