]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r328957:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 19 Apr 2018 02:50:15 +0000 (02:50 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 19 Apr 2018 02:50:15 +0000 (02:50 +0000)
commit0e89d57e0492e0708d7be861bb7087e28808374b
tree195fc22e15bcb3b5ddbb94cc20eef44099b97022
parent89f62c41ab9210a9bbdfcd0392df644a60bb9298
MFC r328957:
{ext2|ufs}_readdir: Avoid setting negative ncookies.

ncookies cannot be negative or the allocator will fail. This should only
happen if a caller is very broken but we can still try to survive the
event.

We should probably also verify for uio_resid > MAXPHYS but in that case
it is not clear that just clipping the ncookies value is an adequate
response.

git-svn-id: svn://svn.freebsd.org/base/stable/10@332750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/ext2fs/ext2_lookup.c
sys/ufs/ufs/ufs_vnops.c