Commit a118cf2a authored by Stefan Berger's avatar Stefan Berger Committed by Jarkko Sakkinen

tpm: fix the type of owned field in cap_t

In cap_t the size of the type bool is assumed to be one byte. This
commit sorts out the issue by changing the type to u8.

Fixes: c659af78 ("tpm: Check size of response before accessing data")
Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 4d23cc32
...@@ -281,7 +281,7 @@ struct permanent_flags_t { ...@@ -281,7 +281,7 @@ struct permanent_flags_t {
typedef union { typedef union {
struct permanent_flags_t perm_flags; struct permanent_flags_t perm_flags;
struct stclear_flags_t stclear_flags; struct stclear_flags_t stclear_flags;
bool owned; __u8 owned;
__be32 num_pcrs; __be32 num_pcrs;
struct tpm_version_t tpm_version; struct tpm_version_t tpm_version;
struct tpm_version_1_2_t tpm_version_1_2; struct tpm_version_1_2_t tpm_version_1_2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment