summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-12-08 18:12:02 +0000
committerimp <imp@FreeBSD.org>1999-12-08 18:12:02 +0000
commit21e16d7051583c05b2e19a80f7f846d2ce1c57aa (patch)
treeef36e360834baaeebc8e9ab729809e03187a77b2 /usr.sbin
parent76438b69a908407ecaaa4c661c48496beade0809 (diff)
downloadFreeBSD-src-21e16d7051583c05b2e19a80f7f846d2ce1c57aa.zip
FreeBSD-src-21e16d7051583c05b2e19a80f7f846d2ce1c57aa.tar.gz
Version 1.16 was a bad change, so revert it.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pccard/pccardd/readcis.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/usr.sbin/pccard/pccardd/readcis.c b/usr.sbin/pccard/pccardd/readcis.c
index ddfd6fc..6fd7c7b 100644
--- a/usr.sbin/pccard/pccardd/readcis.c
+++ b/usr.sbin/pccard/pccardd/readcis.c
@@ -170,29 +170,16 @@ freecis(struct cis *cp)
static void
cis_info(struct cis *cp, unsigned char *p, int len)
{
- unsigned char *end = p + len;
*cp->manuf = *cp->vers = *cp->add_info1 = *cp->add_info2 = '\0';
cp->maj_v = *p++;
cp->min_v = *p++;
- if (p >= end)
- return;
strncpy(cp->manuf, p, CIS_MAXSTR - 1);
- cp->manuf[CIS_MAXSTR - 1] = '\0';
- p += strlen(p);
- if (p >= end)
- return;
+ while (*p++);
strncpy(cp->vers, p, CIS_MAXSTR - 1);
- cp->vers[CIS_MAXSTR - 1] = '\0';
- p += strlen(p);
- if (p >= end)
- return;
+ while (*p++);
strncpy(cp->add_info1, p, CIS_MAXSTR - 1);
- cp->add_info1[CIS_MAXSTR - 1] = '\0';
- p += strlen(p);
- if (p >= end)
- return;
+ while (*p++);
strncpy(cp->add_info2, p, CIS_MAXSTR - 1);
- cp->add_info2[CIS_MAXSTR - 1] = '\0';
}
/*
OpenPOWER on IntegriCloud