Pawel Jakub Dawidek 3a996d6e91 Do not allocate memory based on not-checked argument from userland.
It can be used to panic the kernel by giving too big value.
Fix it by moving allocation and size verification into kern_getfsstat().
This even simplifies kern_getfsstat() consumers, but destroys symmetry -
memory is allocated inside kern_getfsstat(), but has to be freed by the
caller.

Found by:	FreeBSD Kernel Stress Test Suite: http://www.holm.cc/stress/
Reported by:	Peter Holm <peter@holm.cc>
2005-06-11 14:58:20 +00:00
..
2005-06-09 17:35:04 +00:00
2005-03-11 22:07:04 +00:00
2005-03-28 18:31:18 +00:00
2005-05-25 15:54:17 +00:00
2005-06-10 08:05:13 +00:00
2005-02-23 22:44:38 +00:00
2005-06-10 04:44:38 +00:00