Cramfs: fix abad comparison when wrap-arounds occur

commit 672ca9dd13 upstream.

It is possible for corrupted filesystem images to produce very large
block offsets that may wrap when a length is added, and wrongly pass
the buffer size test.

Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Nicolas Pitre 2018-10-30 13:26:15 -04:00 • committed by Ben Hutchings
commit 21e6710a43