From: Stefan Berger Date: Fri, 26 Jan 2018 18:49:24 +0000 (-0500) Subject: tpm: Set the flags of the CMD_INIT command to 0 X-Git-Tag: v2.11.2~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2fc495b4a8378d9bde17d0bc7293b5c66c4970b;p=thirdparty%2Fqemu.git tpm: Set the flags of the CMD_INIT command to 0 The flags of the CMD_INIT control channel command were not initialized properly. Fix this and set to 0. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau (cherry picked from commit 302705876492a39f568035ce346e2c9176f5665e) Signed-off-by: Michael Roth --- diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index e1a68104d6f..ad1f7441326 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/tpm_emulator.c @@ -260,7 +260,9 @@ static int tpm_emulator_check_caps(TPMEmulator *tpm_emu) static int tpm_emulator_startup_tpm(TPMBackend *tb) { TPMEmulator *tpm_emu = TPM_EMULATOR(tb); - ptm_init init; + ptm_init init = { + .u.req.init_flags = 0, + }; ptm_res res; DPRINTF("%s", __func__);