ANDROID: dm: android-verity: Verify header before fetching table
authorBadhri Jagan Sridharan <Badhri@google.com>
Thu, 7 Jul 2016 00:16:19 +0000 (17:16 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 18 Aug 2016 13:26:03 +0000 (18:56 +0530)
commit5e780ef26f1e7d56d33bb61cd32cfb6013c9f31e
treefe66177fe0fd59cd4387e9472dd372f5ca7840c3
parent255fb5b67821db231dcc6e23da14fce3bb7ce2bb
ANDROID: dm: android-verity: Verify header before fetching table

Move header validation logic before reading the verity_table as
an invalid header implies the table is invalid as well.

(Cherry-picked from:
https://partner-android-review.git.corp.google.com/#/c/625203)

BUG: 29940612
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: Ib34d25c0854202f3e70df0a6d0ef1d96f0250c8e
drivers/md/dm-android-verity.c