[U-Boot] fs: ext4: Fix journal overrun issue reported by Coverity

Tom Rini trini at konsulko.com
Sat Aug 26 20:46:57 UTC 2017


On Sun, Aug 20, 2017 at 10:30:15PM -0400, Tom Rini wrote:

> While &p_jdb[fs->blksz] is a valid expression (it points *one* char
> sized element past the end of the array, e.g. &p_jdb[fs->blksz + 1] is
> invalid (according to the C standard (C99/C11)).
> 
> Changing this to tag = (struct ext3_journal_block_tag *)(p_jdb + ofs);
> 
> Cc: Stefan Brüns <stefan.bruens at rwth-aachen.de>
> Suggested-by: Stefan Brüns <stefan.bruens at rwth-aachen.de>
> Reported-by: Coverity (CID: 165117, 165110)
> Signed-off-by: Tom Rini <trini at konsulko.com>
> Reviewed-by: Stefan Brüns <stefan.bruens at rwth-aachen.de>

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: <http://lists.denx.de/pipermail/u-boot/attachments/20170826/fc4cd986/attachment.sig>


More information about the U-Boot mailing list