From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 24 Oct 2016 11:23:55 -0400 Subject: [U-Boot] [U-Boot, 2/3] ext4: Fix handling of direntlen in unlink_filename In-Reply-To: References: Message-ID: <20161024152355.GT18591@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, Oct 09, 2016 at 08:15:27PM +0200, Stefan Br?ns wrote: > 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 > Reported-by: Coverity (CID: 153383, 153384) > Reviewed-by: Tom Rini > Reviewed-by: Lukasz Majewski Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: