From: Philip Homburg Date: Mon, 28 Aug 2006 15:30:14 +0000 (+0000) Subject: NUL terminate timingdata[cat].names instead of timingdata[0].names. Reported X-Git-Tag: v3.1.3~186 X-Git-Url: http://zhaoyanbai.com/repos/man.arpaname.html?a=commitdiff_plain;h=4cc6be853291b4515a36ccd77f57066cb6f81f28;p=minix.git NUL terminate timingdata[cat].names instead of timingdata[0].names. Reported by . --- diff --git a/kernel/debug.c b/kernel/debug.c index dd7303d5d..a686b5a95 100644 --- a/kernel/debug.c +++ b/kernel/debug.c @@ -27,7 +27,7 @@ void timer_start(int cat, char *name) for(i = 0; i < sizeof(timingdata[0].names) && *name; i++) timingdata[cat].names[i] = *name++; - timingdata[0].names[sizeof(timingdata[0].names)-1] = '\0'; + timingdata[cat].names[sizeof(timingdata[0].names)-1] = '\0'; if (starttimes[cat][HIGHCOUNT]) { return; }