From 8f1e590eee0d1791775dd72eaff55a1b79f825d2 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 27 Mar 2009 18:41:39 +0000 Subject: do not use random string as device description broken since commit r225445 from 2007-08-06: (pciusb_find_modules) handle pcitable without description field Broken output was the following: Mouse:USB|Generic 2 Button Mouse: base.frm" [Human Interface Device|Boot Interface Subclass|Mouse] (vendor:0603 device:6871) --- pciusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pciusb.c') diff --git a/pciusb.c b/pciusb.c index 3bfc598..a1b8cf8 100644 --- a/pciusb.c +++ b/pciusb.c @@ -205,7 +205,7 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu e->module = strndup(p,q-p-1); } /* special case for buggy 0x0 usb entry */ - if (descr_lookup == LOAD && 2 < strlen(q+2) && vendor != 0 && device != 0 && e->class_id != 0x90000d) { /* Hub class */ + if (descr_lookup == LOAD && strlen(q) > 1 && 2 < strlen(q+2) && vendor != 0 && device != 0 && e->class_id != 0x90000d) { /* Hub class */ ifree(e->text); /* usb.c set it so that we display something when usbtable doesn't refer that hw*/ e->text = strndup(q+2, strlen(q)-4); } -- cgit v1.2.1