FreeBSD Kernel buffer overflow
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Sep 18 02:02:29 PDT 2004
On Fri, Sep 17, 2004 at 12:37:12PM +0300, Giorgos Keramidas wrote:
+> % +#ifdef INVARIANTS
+> % + KASSERT(0 <= narg && narg <= 8, ("invalid number of syscall args"));
+> % +#endif
Maybe:
KASSERT(0 <= narg && narg <= sizeof(args) / sizeof(args[0]),
("invalid number of syscall args"));
So if we decide to increase/decrease it someday, we don't have to remember
about this KASSERT().
--
Pawel Jakub Dawidek http://www.FreeBSD.org
pjd at FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040918/e123e2ce/attachment.bin
More information about the freebsd-hackers
mailing list