ext4_utils: fix crash when filesystem size is too small

make_ext4fs crashes if size is less than block size or less than
header size (super block + descriptors + bitmaps). Check the size
and return errors.

Test: run make_ext4fs with small sizes
Bug: 36576677
Change-Id: I61d92e280cdf290054fadda5a045fc839c6fd8fe
diff --git a/ext4_utils/ext4_utils.c b/ext4_utils/ext4_utils.c
index 550181f..07a9211 100644
--- a/ext4_utils/ext4_utils.c
+++ b/ext4_utils/ext4_utils.c
@@ -222,6 +222,9 @@
 	if (ext4_bg_has_super_block(aux_info.groups - 1))
 		last_header_size += 1 + aux_info.bg_desc_blocks +
 			info.bg_desc_reserve_blocks;
+	if (aux_info.groups <= 1 && last_group_size < last_header_size) {
+		critical_error("filesystem size too small");
+	}
 	if (last_group_size > 0 && last_group_size < last_header_size) {
 		aux_info.groups--;
 		aux_info.len_blocks -= last_group_size;