git: 9front

Download patch

ref: 10a96be1b13426e85d22b4c7457484b94af95e6c
parent: e56eb3e8e7cfdd61477b819a64a6264eade6dfad
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Mon May 23 19:15:06 EDT 2011

aux/vga: pci.c dircount bug 3

--- a/sys/src/cmd/aux/vga/pci.c
+++ b/sys/src/cmd/aux/vga/pci.c
@@ -28,6 +28,7 @@
 		if(strstr(d[i].name, "ctl") == nil)
 			continue;
 
+		strncpy(buf, d[i].name, sizeof(buf));
 		bno = strtoul(buf, &s, 10);
 		dno = strtoul(s+1, &s, 10);
 		fno = strtoul(s+1, nil, 10);
--