forked from pool/ibmswtpm2
7051adbd68
- update to 1682: * tpm: Fix cast in BnSetBit. * tpm2: Fix size check in CryptSecretDecrypt * tpm: Port Windows code for OpenSSL 3.0 * tpm: Update to openssl 3.0.2 * tpm: Add command and handle tracing * tpm: Update for openssl 3.0.1 * tpm: Add ECC encrypt and decrypt commands * Fix compilation on RISC-V * PlatformSvc: return error on control socket failure * main: set a return code if StartTcpServer fails * tpm: Add all updates to TPM specification 164. - drop ibmswtpm2-fix-ppc32.patch (upstream) - makefile.patch: refresh OBS-URL: https://build.opensuse.org/request/show/1005719 OBS-URL: https://build.opensuse.org/package/show/security/ibmswtpm2?expand=0&rev=26
28 lines
915 B
Diff
28 lines
915 B
Diff
From 03efa66788ca4828392664c4f6123ad4f190c865 Mon Sep 17 00:00:00 2001
|
|
From: Michal Suchanek <msuchanek@suse.de>
|
|
Date: Mon, 17 Aug 2020 19:28:51 +0200
|
|
Subject: [PATCH] TcpServerPosix: Fix use of uninitialized value.
|
|
|
|
ReadUINT32 does not modify the output when it fails. Do not use the
|
|
output in that case.
|
|
|
|
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
|
---
|
|
src/TcpServerPosix.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
Index: ibmswtpm2-1682/src/TcpServerPosix.c
|
|
===================================================================
|
|
--- ibmswtpm2-1682.orig/src/TcpServerPosix.c
|
|
+++ ibmswtpm2-1682/src/TcpServerPosix.c
|
|
@@ -264,7 +264,8 @@ PlatformServer(
|
|
{
|
|
uint32_t actHandle;
|
|
ok = ReadUINT32(s, &actHandle);
|
|
- WriteUINT32(s, _rpc__ACT_GetSignaled(actHandle));
|
|
+ if(ok)
|
|
+ WriteUINT32(s, _rpc__ACT_GetSignaled(actHandle));
|
|
break;
|
|
}
|
|
default:
|