mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-04 16:33:49 +00:00
tpm12: Replace strcpy with safer strncpy
Replace the strcpy with the safer strncpy version. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
f289817a61
commit
75a2cd1a78
@ -135,7 +135,7 @@ TPM_RESULT TPM_NVRAM_Init(void)
|
||||
}
|
||||
}
|
||||
if (rc == 0) {
|
||||
strcpy(state_directory, tpm_state_path);
|
||||
strncpy(state_directory, tpm_state_path, sizeof(state_directory));
|
||||
printf("TPM_NVRAM_Init: Rooted state path %s\n", state_directory);
|
||||
}
|
||||
return rc;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user