summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1997-12-08 06:35:07 +0000
committernate <nate@FreeBSD.org>1997-12-08 06:35:07 +0000
commitdb661a8b0cd07e05505e16d7740d34c8f19bf4c8 (patch)
treecc6e8c562459d93228e735a233cf85c5823d1bc6
parentf22f07ffe0a82f242bb8e6bf62ddc05fde8a7ccc (diff)
downloadFreeBSD-src-db661a8b0cd07e05505e16d7740d34c8f19bf4c8.zip
FreeBSD-src-db661a8b0cd07e05505e16d7740d34c8f19bf4c8.tar.gz
- Changed strcmp to strncmp for checking the CIS manufacturer strings,
since we only store CIS_MAXSTR data, and the users may stick the 'entire' CIS string returned from the card in /etc/pccard.conf and cause the comparison to (bogusly) fail. Submitted by: Brad Karp <karp@eecs.harvard.edu>
-rw-r--r--usr.sbin/pccard/pccardd/cardd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c
index 4b392a5..a631615 100644
--- a/usr.sbin/pccard/pccardd/cardd.c
+++ b/usr.sbin/pccard/pccardd/cardd.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: cardd.c,v 1.21 1997/11/19 02:31:37 nate Exp $";
+ "$Id: cardd.c,v 1.22 1997/11/25 19:15:59 nate Exp $";
#endif /* not lint */
#include <fcntl.h>
@@ -288,8 +288,8 @@ card_inserted(struct slot *sp)
dumpcis(sp->cis);
#endif
for (cp = cards; cp; cp = cp->next)
- if (strcmp(cp->manuf, sp->cis->manuf) == 0 &&
- strcmp(cp->version, sp->cis->vers) == 0)
+ if (strncmp(cp->manuf, sp->cis->manuf, CIS_MAXSTR) == 0 &&
+ strncmp(cp->version, sp->cis->vers, CIS_MAXSTR) == 0)
break;
sp->card = cp;
#if 0
OpenPOWER on IntegriCloud