summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-10-27 13:21:15 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-10-27 13:21:15 +0000
commitc21bfa472744be71912db3f6d96093b42e16f808 (patch)
tree4a3b7dbd1f9fa08542421006714f5c270032351c
parent69ee30dead73ccc1b386a501d61fad26d8366e49 (diff)
downloadldetect-c21bfa472744be71912db3f6d96093b42e16f808.tar
ldetect-c21bfa472744be71912db3f6d96093b42e16f808.tar.gz
ldetect-c21bfa472744be71912db3f6d96093b42e16f808.tar.bz2
ldetect-c21bfa472744be71912db3f6d96093b42e16f808.tar.xz
ldetect-c21bfa472744be71912db3f6d96093b42e16f808.zip
keep existing description string if already reported by the device
-rw-r--r--pciusb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pciusb.c b/pciusb.c
index 201be77..ee9b684 100644
--- a/pciusb.c
+++ b/pciusb.c
@@ -118,7 +118,7 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu
if (strncmp(p, "unknown", q-p-1))
e->module = strndup(p,q-p-1);
/* special case for buggy 0x0 usb entry */
- if (vendor != 0 && device != 0 && e->class_ != 0x90000d) { /* Hub class */
+ if (2 < strlen(q+2) && vendor != 0 && device != 0 && e->class_ != 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);
}