Whamcloud - gitweb
AOSP: ext2simg: clean up integer types and check for too-large fs
authorEric Biggers <ebiggers@google.com>
Thu, 23 Mar 2023 00:44:22 +0000 (00:44 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 May 2024 17:05:24 +0000 (13:05 -0400)
commitbe1e4efec9c511eb4a42d1bb9a60882c92cf0685
treed9c9e9ca838e7a0ffb091b43fd00b7dd737369ee
parent087061b9cc1eba1965d6cd169183a10fc4165e85
AOSP: ext2simg: clean up integer types and check for too-large fs

libsparse assumes 32-bit block numbers.  Also, ext2simg might read
nearly the entire filesystem into memory.

Therefore, make ext2simg use appropriate integer types, and explicitly
check for when the filesystem is too large or allocating memory failed.

Change-Id: Ic415d0e974dce2b4ff6e7fa9265f6e86d371a274
Signed-off-by: Eric Biggers <ebiggers@google.com>
From AOSP commit: 8fff11068c100be627745967992fb88759dea9c1
contrib/android/ext2simg.c