mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-05 12:56:08 +00:00
- 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>
This commit is contained in:
parent
78922e413c
commit
50b5ec4154
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31621
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -288,8 +288,8 @@ card_inserted(struct slot *sp)
|
|||||||
dumpcis(sp->cis);
|
dumpcis(sp->cis);
|
||||||
#endif
|
#endif
|
||||||
for (cp = cards; cp; cp = cp->next)
|
for (cp = cards; cp; cp = cp->next)
|
||||||
if (strcmp(cp->manuf, sp->cis->manuf) == 0 &&
|
if (strncmp(cp->manuf, sp->cis->manuf, CIS_MAXSTR) == 0 &&
|
||||||
strcmp(cp->version, sp->cis->vers) == 0)
|
strncmp(cp->version, sp->cis->vers, CIS_MAXSTR) == 0)
|
||||||
break;
|
break;
|
||||||
sp->card = cp;
|
sp->card = cp;
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
Reference in New Issue
Block a user