Don't confuse the tuple code and the tuple length. Ooops. Since most

CIS are tiny, this likely hasn't bit anybody yet...
This commit is contained in:
Warner Losh 2005-09-21 20:08:24 +00:00
parent e12560dd4b
commit 209161a4f6

View file

@ -95,7 +95,7 @@ pccard_build_cis(const struct pccard_tuple *tuple, void *argp)
cis->buffer[cis->len++] = tuple->code;
return (0);
}
if (cis->len + 2 + tuple->code > sizeof(cis->buffer))
if (cis->len + 2 + tuple->length > sizeof(cis->buffer))
return (ENOSPC);
cis->buffer[cis->len++] = tuple->code;
cis->buffer[cis->len++] = tuple->length;