mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
tpm2: use memcpy_safe() instead of memcpy()
This commit is contained in:
parent
ae2b38e463
commit
65fd657e0a
@ -199,7 +199,7 @@ int tpm2_tpm2b_public_to_fingerprint(const TPM2B_PUBLIC *public, void **ret_fing
|
||||
struct_type UNIQ_T(STRUCT, uniq) = { .size_field = UNIQ_T(SIZE, uniq), }; \
|
||||
assert(sizeof(UNIQ_T(STRUCT, uniq).buffer_field) >= (size_t) UNIQ_T(SIZE, uniq)); \
|
||||
if (UNIQ_T(BUF, uniq)) \
|
||||
memcpy(UNIQ_T(STRUCT, uniq).buffer_field, UNIQ_T(BUF, uniq), UNIQ_T(SIZE, uniq)); \
|
||||
memcpy_safe(UNIQ_T(STRUCT, uniq).buffer_field, UNIQ_T(BUF, uniq), UNIQ_T(SIZE, uniq)); \
|
||||
UNIQ_T(STRUCT, uniq); \
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user