diff options
author | imp <imp@FreeBSD.org> | 2005-09-21 20:08:24 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-09-21 20:08:24 +0000 |
commit | d5f4d6d5c5d61f917598932ad212de69b861bd55 (patch) | |
tree | c35c7b8d6e03cf6345a50c348e2e09a07d72d6cd /sys | |
parent | 02342146b6892e9fe889eb209d7d9f54fcf43160 (diff) | |
download | FreeBSD-src-d5f4d6d5c5d61f917598932ad212de69b861bd55.zip FreeBSD-src-d5f4d6d5c5d61f917598932ad212de69b861bd55.tar.gz |
Don't confuse the tuple code and the tuple length. Ooops. Since most
CIS are tiny, this likely hasn't bit anybody yet...
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pccard/pccard_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pccard/pccard_device.c b/sys/dev/pccard/pccard_device.c index 3cee757..807ed79 100644 --- a/sys/dev/pccard/pccard_device.c +++ b/sys/dev/pccard/pccard_device.c @@ -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; |