app: aboot: add check to validate block size for sparse image header.

For Sparse image header block size should be multiple of 4, add check
to ensure same is enforced in code.

Change-Id: I0ea09e6a468dda5a3942e390353c809cf6f139cd
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 83a2c49..46a6905 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -3074,6 +3074,11 @@
 	/* Read and skip over sparse image header */
 	sparse_header = (sparse_header_t *) data;
 
+	if (!sparse_header->blk_sz || (sparse_header->blk_sz % 4)){
+		fastboot_fail("Invalid block size\n");
+		return;
+	}
+
 	if (((uint64_t)sparse_header->total_blks * (uint64_t)sparse_header->blk_sz) > size) {
 		fastboot_fail("size too large");
 		return;
@@ -3130,11 +3135,6 @@
 			return;
 		}
 
-		if (!sparse_header->blk_sz ){
-			fastboot_fail("Invalid block size\n");
-			return;
-		}
-
 		chunk_data_sz = (uint64_t)sparse_header->blk_sz * chunk_header->chunk_sz;
 
 		/* Make sure that the chunk size calculated from sparse image does not