]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tpm: Set the flags of the CMD_INIT command to 0
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 26 Jan 2018 18:49:24 +0000 (13:49 -0500)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Mon, 29 Jan 2018 17:24:51 +0000 (12:24 -0500)
The flags of the CMD_INIT control channel command were not
initialized properly. Fix this and set to 0.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
hw/tpm/tpm_emulator.c

index 35c78de5a9f801e6e3886fa5379e652b1666a4eb..532d3e3c52a07a35f18b64e2c8795ee1e4985281 100644 (file)
@@ -320,7 +320,9 @@ static int tpm_emulator_set_buffer_size(TPMBackend *tb,
 static int tpm_emulator_startup_tpm(TPMBackend *tb, size_t buffersize)
 {
     TPMEmulator *tpm_emu = TPM_EMULATOR(tb);
-    ptm_init init;
+    ptm_init init = {
+        .u.req.init_flags = 0,
+    };
     ptm_res res;
 
     if (buffersize != 0 &&