mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-08 10:06:32 +00:00
The following error occurrs on Fedora build servers. To silence the
compiler warning add runtime asserts:
tpm2/crypto/openssl/CryptCmac.c: In function 'CryptCmacEnd':
tpm2/crypto/openssl/CryptCmac.c:194:48: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
194 | subkey.t.buffer[subkey.t.size - 1] ^= xorVal;
| ^
tpm2/TpmTypes.h:1477:33: note: at offset -1 into destination object 'buffer' of size 16
1477 | BYTE buffer[MAX_SYM_BLOCK_SIZE];
| ^
lto1: all warnings being treated as errors
In CryptCmacStart the following initialization is done:
cState->iv.t.size = CryptGetSymmetricBlockSize(def->algorithm, def->keyBits.sym);
Also ensure that CryptGetSymmetricBlockSize in this case also always returns
a valid size to the TPM2B_IV that it is initializing, which would be the root
cause of any error.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
||
|---|---|---|
| .. | ||
| tpm2 | ||
| tpm12 | ||
| compiler.h | ||
| disabled_interface.c | ||
| libtpms.syms | ||
| Makefile.am | ||
| test.syms | ||
| tpm_debug.c | ||
| tpm_debug.h | ||
| tpm_library_conf.h | ||
| tpm_library_intern.h | ||
| tpm_library.c | ||
| tpm_memory.c | ||
| tpm_nvfile.c | ||
| tpm_nvfile.h | ||
| tpm_tpm2_interface.c | ||
| tpm_tpm2_tis.c | ||
| tpm_tpm12_interface.c | ||
| tpm_tpm12_tis.c | ||