From be5157fb3c02a602e9299fdac562ede9c44d50ab Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 3 Jul 2001 20:28:30 +0000 Subject: fix pb when 2 similar cards are there --- pciusb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pciusb.c') diff --git a/pciusb.c b/pciusb.c index 37f3edb..d36ac30 100644 --- a/pciusb.c +++ b/pciusb.c @@ -1,5 +1,8 @@ +#define _GNU_SOURCE + #include #include +#include #include #include #include @@ -96,7 +99,7 @@ extern int pciusb_find_modules(struct pciusb_entries entries, const char *fpcius } if ((nb != 4 || (subvendor == e->subvendor && subdevice == e->subdevice)) && !e->module) { - char *p = buf + offset + 1; + char *p = strdupa(buf + offset + 1); char *q = strchr(p, '\t'); if (q) { q[-1] = 0; -- cgit v1.2.1