Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf8a067b authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan
Browse files

ANDROID: dm: android-verity: Remove fec_header location constraint



This CL removes the mandate of the fec_header being located right
after the ECC data.

Bug: 28865197
Signed-off-by: default avatarBadhri Jagan Sridharan <Badhri@google.com>
Change-Id: Ie04c8cf2dd755f54d02dbdc4e734a13d6f6507b5
parent e4dd889d
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -267,10 +267,7 @@ static inline int validate_fec_header(struct fec_header *header, u64 offset)
		le32_to_cpu(header->version) != FEC_VERSION ||
		le32_to_cpu(header->size) != sizeof(struct fec_header) ||
		le32_to_cpu(header->roots) == 0 ||
		le32_to_cpu(header->roots) >= FEC_RSM ||
		offset < le32_to_cpu(header->fec_size) ||
		offset - le32_to_cpu(header->fec_size) !=
		le64_to_cpu(header->inp_size))
		le32_to_cpu(header->roots) >= FEC_RSM)
		return -EINVAL;

	return 0;