[U-Boot] [PATCH v2 5/5] ext4: optimize direntlen loops

Stefan Bruens stefan.bruens at rwth-aachen.de
Sun Aug 28 22:55:44 CEST 2016


On Dienstag, 23. August 2016 10:27:42 CEST Michael Walle wrote:
> direntlen is always >= 8. Therefore, the loop condition is always true.
> 
> Signed-off-by: Michael Walle <michael at walle.cc>
> Suggested-by: Stefan Brüns <stefan.bruens at rwth-aachen.de>

Thinking again about it, direntlen is read from disk, and as any outside data 
should be untrusted. In case the direntlen is 0, we get an infinite loop here.

Also see commit 54d68e9333ff65d135faac68fa01be4276f1371f :
fs: ext4: Prevent infinite loop in ext4fs_iterate_dir

So better drop this patch.

Kind regards,

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424


More information about the U-Boot mailing list