freebsd-skq/usr.sbin/pccard/pccardd
Warner Losh 7a731ac2d2 Update length more correctly when parsing a cis info field.
Before, we were using
	while (*p++ && --len > 0);
to do this.  However, len doesn't get decremented for the NUL byte, so when
we used len later to see if we still have CIS left for some optional fields,
we'd run off the end of an array and dump core.

Instead, replace it with
	len -= strlen(p) + 1;
	p += strlen(p) + 1;
which is more correct.  It is a little bogus to assume that p points to
a valid C string, but only a little.  The PC Card SPEC mandates that it
does, and we already depend on that with the use of strdup a few lines
earlier.  Since much of the rest of the cis parsing code isn't hyper
retentive about error checking, I'll leave that level of checking for
another time and/or another committer :-).
2002-01-06 18:03:55 +00:00
..
cardd.c Fix a bug about CIS string comparison. Pccardd should be able to distinguish 2001-11-29 14:33:57 +00:00
cardd.h add -I option, ``Don't get and use a list of free 2000-10-20 13:08:18 +00:00
file.c Always set unit number to -1 unless some other unit is specified in 2001-11-02 17:28:43 +00:00
Makefile Perform a major cleanup of the usr.sbin Makefiles. 2001-07-20 06:20:32 +00:00
pccard.conf.5 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
pccardd.8 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
pccardd.c Ask the kernel about IRQ 0 first. If the kernel responds with an IRQ, 2001-08-14 19:18:33 +00:00
readcis.c Update length more correctly when parsing a cis info field. 2002-01-06 18:03:55 +00:00
readcis.h MFPAO3. Improvement of of pccard cis tuple parsing capability. 2000-04-26 15:36:43 +00:00
server.c Add UNIX domain socket feature to pccardd. This makes pccard 2000-08-20 16:16:57 +00:00
util.c Use vsnprintf in logmsg() to avoid overflowing the array on the stack. 2001-02-25 19:52:42 +00:00