Skip to contentSkip to conversation

Off-by-one in show_cpuinfo

Linux-ia64 Andreas Schwab 1 participant 1 message May 24, 2002

lore
Share & tools
lore
#0 lore raw

This fixes an off-by-one in show_cpuinfo (to get the NUL copied too):

arch/ia64/kernel/setup.c renamed from arch/ia64/kernel/setup.c.~1~ +1 -1
@@ -393,7 +393,7 @@ show_cpuinfo (struct seq_file *m, void *
 
 	switch (c->family) {
 	      case 0x07:	memcpy(family, "Itanium", 8); break;
-	      case 0x1f:	memcpy(family, "Itanium 2", 9); break;
+	      case 0x1f:	memcpy(family, "Itanium 2", 10); break;
 	      default:		sprintf(family, "%u", c->family); break;
 	}
 

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."