diff options
author | loos <loos@FreeBSD.org> | 2015-05-13 02:25:54 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2015-05-13 02:25:54 +0000 |
commit | 1aadf4978fcd18b2c41265a79e11e685fc0fa924 (patch) | |
tree | a803ce445d51e0a0e66b990f4200b912b4a2c090 /sys/arm | |
parent | e5dea16a768045c5ecd051198a22e5f74cdc8b14 (diff) | |
download | FreeBSD-src-1aadf4978fcd18b2c41265a79e11e685fc0fa924.zip FreeBSD-src-1aadf4978fcd18b2c41265a79e11e685fc0fa924.tar.gz |
Fix the vmstat -i output on ARM.
The consumers of hw.intrnames expect a NULL byte at end of the string
containing the interrupt names.
On ARM all the interrupt name slots are initialized and this leave no room
for the terminating NULL byte, which makes vmstat read beyond the end of
intrnames.
PR: 199891
Tested on: RPi 2 and BeagleBone Black
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/intr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/arm/intr.c b/sys/arm/arm/intr.c index be8e87c..9505915 100644 --- a/sys/arm/arm/intr.c +++ b/sys/arm/arm/intr.c @@ -78,7 +78,7 @@ int (*arm_config_irq)(int irq, enum intr_trigger trig, /* Data for statistics reporting. */ u_long intrcnt[NIRQ]; -char intrnames[NIRQ * INTRNAME_LEN]; +char intrnames[(NIRQ * INTRNAME_LEN) + 1]; size_t sintrcnt = sizeof(intrcnt); size_t sintrnames = sizeof(intrnames); |