]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r328957:
authorpfg <pfg@FreeBSD.org>
Thu, 19 Apr 2018 02:47:21 +0000 (02:47 +0000)
committerpfg <pfg@FreeBSD.org>
Thu, 19 Apr 2018 02:47:21 +0000 (02:47 +0000)
commite59d0f6d1e69b1476097c8b747b84d5e9ead8e0d
tree589121ee298df6a1551048297f9aa4d032805279
parent90e794c496bd0e45baa9605e6fbb6137e8c1564d
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.
sys/fs/ext2fs/ext2_lookup.c
sys/ufs/ufs/ufs_vnops.c