Skip to content
Snippets Groups Projects
Commit 0ceef3d3 authored by Stefan Brüns's avatar Stefan Brüns Committed by Tom Rini
Browse files

ext4: Avoid out-of-bounds access of block bitmap


If the blocksize is 1024, count is initialized with 1. Incrementing count
by 8 will never match (count == fs->blksz * 8), and ptr may be
incremented beyond the buffer end if the bitmap is filled. Add the
startblock offset after the loop.

Remove the second loop, as only the first iteration will be done.

Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: default avatarLukasz Majewski <l.majewski@samsung.com>
parent a9fa0ed1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment