Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys intrid and dev_xname must be NUL terminated by kernel.



details:   https://anonhg.NetBSD.org/src/rev/f1541b29f0b9
branches:  trunk
changeset: 346785:f1541b29f0b9
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed Aug 03 08:25:38 2016 +0000

description:
intrid and dev_xname must be NUL terminated by kernel.

pointed out by nonaka@n.o

diffstat:

 sys/sys/intrio.h |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 8db5f209ff9d -r f1541b29f0b9 sys/sys/intrio.h
--- a/sys/sys/intrio.h  Wed Aug 03 03:35:24 2016 +0000
+++ b/sys/sys/intrio.h  Wed Aug 03 08:25:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intrio.h,v 1.1 2015/08/17 06:16:03 knakahara Exp $     */
+/*     $NetBSD: intrio.h,v 1.2 2016/08/03 08:25:38 knakahara Exp $     */
 
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
@@ -47,9 +47,12 @@
 };
 
 struct intrio_list_line {
-       char ill_intrid[INTRIDBUF];
-       char ill_xname[INTRDEVNAMEBUF];
-       struct intrio_list_line_cpu ill_cpu[1]; /* Array size is overwritten to ncpu. */
+       char ill_intrid[INTRIDBUF];             /* NUL terminated. */
+       char ill_xname[INTRDEVNAMEBUF];         /* NUL terminated. */
+       struct intrio_list_line_cpu ill_cpu[1]; /*
+                                                * Array size is overwritten
+                                                * to ncpu.
+                                                */
 };
 
 struct intrio_list {



Home | Main Index | Thread Index | Old Index