freebsd-nq/sys/ufs
Konstantin Belousov 7aac7bc18a Fix unbounded-length malloc, controlled from usermode. The added check
is performed before exact size of the buffer is calculated, but the
buffer cannot have size greater then the total space allocated for
extended attributes. The existing check is executing with precise
size, but it is too late, since buffer needs to be allocated in
advance.

Also, adapt to uio_resid being of ssize_t type.  Use lblktosize instead of
multiplying by fs block size by hand as well.

Reported and tested by:	  pho
MFC after:   1 week
2012-06-21 09:20:07 +00:00
..
ffs Fix unbounded-length malloc, controlled from usermode. The added check 2012-06-21 09:20:07 +00:00
ufs Implement SEEK_HOLE/SEEK_DATA for UFS. 2012-05-26 05:29:53 +00:00