Searched hist:d1bdf22461e9f0638d4ddca0ccccfe61f8a653cf (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/fs/ext4/ |
| H A D | ext4_common.c | d1bdf22461e9f0638d4ddca0ccccfe61f8a653cf Sun Oct 09 18:15:27 UTC 2016 Stefan Brüns <stefan.bruens@rwth-aachen.de> ext4: Fix handling of direntlen in unlink_filename
The direntlen checks were quite bogus, i.e. the loop termination used "len + offset == blocksize" (exact match only), and checked for a direntlen less than 0. The latter can never happen as the len is unsigned, this has been reported by Coverity, CID 153384.
Use the same code as in search_dir for directory traversal. This code has the correct checks for direntlen >= sizeof(struct dirent), and offset < blocksize.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reported-by: Coverity (CID: 153383, 153384) Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
|