in sys/netsmb/smb_subr.c the following code fragment is used:
[FreeBSD 4.10]
int smb_checksmp(void) { int name[2]; int olen, ncpu, plen, error;
name[0] = CTL_HW; name[1] = HW_NCPU; error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen); if (error) return error;
olen is passed without having its value set. on input, i'd expect it to specify sizeof(ncpu). looking in kernel_sysctl.c, *olen is used by kernel_sysctl.
I had a quick grep through the source and saw a similar code fragment to this in nwfs. So it could be either that I've got it wrong and I'm not understanding something, or the code was used as a template in more than one place and was bug-for-bug copied.
Feedback appreciated, cc'd
Matthew _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"