]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2image: fix overflow in l2 table processing
authorArtem Blagodarenko <artem.blagodarenko@gmail.com>
Thu, 22 Apr 2021 05:24:48 +0000 (01:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 7 May 2021 22:48:45 +0000 (18:48 -0400)
commitf11448318f99aa5fde27aea6b73420d6c495a4f6
tree9fe3a81d3814ac6e6073066ac14d5e906bab54c9
parent9ae89fe3a96f089ed5683df1cd0660e7e1694af0
e2image: fix overflow in l2 table processing

For a large partition during e2image capture process
it is possible to overflow offset at multiply operation.
This leads to the situation when data is written to the
position at the start of the image instead of the image end.

Let's use the right cast to avoid integer overflow.

Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Signed-off-by: Artem Blagodarenko <c17828@cray.com>
HPE-bug-id: LUS-9368
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/qcow2.c