aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorJarkko Sakkinen <[email protected]>2024-04-29 16:27:54 -0400
committerJarkko Sakkinen <[email protected]>2024-05-09 22:30:51 +0300
commite1b72e1b11109bd81577950538a17bc0428e647f (patch)
tree71735a798386429af0e0e358bfbc866c0597b459 /lib/test_fortify/write_overflow-strncpy-src.c
parent37e2ee16d67d17926085cbd0500dd78ca747e59c (diff)
tpm: Store the length of the tpm_buf data separately.
TPM2B buffers, or sized buffers, have a two byte header, which contains the length of the payload as a 16-bit big-endian number, without counting in the space taken by the header. This differs from encoding in the TPM header where the length includes also the bytes taken by the header. Unbound the length of a tpm_buf from the value stored to the TPM command header. A separate encoding and decoding step so that different buffer types can be supported, with variant header format and length encoding. Signed-off-by: James Bottomley <[email protected]> Reviewed-by: Stefan Berger <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Tested-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions