mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-07 19:47:22 +00:00
tpm2: Require TPM_NV_DISK to avoid case of tpm_stata_path being NULL
Address an issue reported by cppcheck that raises the issue that tpm_state_path could be NULL when the #define TPM_NV_DISK is not set. Require that the #define TPM_NV_DISK always be set. Resolves: https://github.com/stefanberger/libtpms/issues/313 Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
5bc860ac37
commit
73fca84031
@ -123,6 +123,8 @@ TPM_RESULT TPM_NVRAM_Init(void)
|
||||
rc = TPM_FAIL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
# error TPM_NV_DISK must be defined
|
||||
#endif
|
||||
/* check that the directory name plus a file name will not overflow FILENAME_MAX */
|
||||
if (rc == 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user