summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard
diff options
context:
space:
mode:
authorhosokawa <hosokawa@FreeBSD.org>1998-03-20 04:49:19 +0000
committerhosokawa <hosokawa@FreeBSD.org>1998-03-20 04:49:19 +0000
commitf4dbb36a3ec36d5c2de2ae5cfa8318298d9c1984 (patch)
tree0121fa268b0b15bc92a55eeb0d69da8daf68b783 /usr.sbin/pccard
parentdd095881a0f8fab471d57a1ec585fe56ffcad2b1 (diff)
downloadFreeBSD-src-f4dbb36a3ec36d5c2de2ae5cfa8318298d9c1984.zip
FreeBSD-src-f4dbb36a3ec36d5c2de2ae5cfa8318298d9c1984.tar.gz
Some parameter was left uninitialized when the card with incomplete
"Version 1" CIS tupple is plugged after normal card.
Diffstat (limited to 'usr.sbin/pccard')
-rw-r--r--usr.sbin/pccard/pccardd/readcis.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pccard/pccardd/readcis.c b/usr.sbin/pccard/pccardd/readcis.c
index d681aa9..114b35e 100644
--- a/usr.sbin/pccard/pccardd/readcis.c
+++ b/usr.sbin/pccard/pccardd/readcis.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: readcis.c,v 1.10 1997/10/06 11:36:08 charnier Exp $";
+ "$Id: readcis.c,v 1.11 1997/11/18 21:08:14 nate Exp $";
#endif /* not lint */
#include <err.h>
@@ -170,14 +170,19 @@ freecis(struct cis *cp)
static void
cis_info(struct cis *cp, unsigned char *p, int len)
{
+ *cp->manuf = *cp->vers = *cp->add_info1 = *cp->add_info2 = '\0';
cp->maj_v = *p++;
cp->min_v = *p++;
+ if (*p == 0xff) return;
strncpy(cp->manuf, p, CIS_MAXSTR - 1);
while (*p++);
+ if (*p == 0xff) return;
strncpy(cp->vers, p, CIS_MAXSTR - 1);
while (*p++);
+ if (*p == 0xff) return;
strncpy(cp->add_info1, p, CIS_MAXSTR - 1);
while (*p++);
+ if (*p == 0xff) return;
strncpy(cp->add_info2, p, CIS_MAXSTR - 1);
}
OpenPOWER on IntegriCloud