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
This commit is contained in:
Wojciech Macek 2018-01-26 09:38:40 +00:00
parent 53c2c7918d
commit 919736d252

View File

@ -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);