]> git.ipfire.org Git - thirdparty/systemd.git/commit
tpm2: use GREEDY_REALLOC_APPEND() in tpm2_get_capability_handles(), cap max value
authorDan Streetman <ddstreet@ieee.org>
Fri, 8 Sep 2023 18:22:11 +0000 (14:22 -0400)
committerDan Streetman <ddstreet@ieee.org>
Tue, 3 Oct 2023 16:56:55 +0000 (12:56 -0400)
commit7014006906113acf35d4927ef7f287ddaa935fca
tree37c3f73ec519e4e0f49156e1d6d2d37b6cd6c2eb
parent171d5b69c025c4a86a5100e9437b934ad84daca4
tpm2: use GREEDY_REALLOC_APPEND() in tpm2_get_capability_handles(), cap max value

Simplify the function with GREEDY_REALLOC_APPEND(). Also limit the size_t-sized
max value to UINT32_MAX since that's the maximum of the range this searches,
and the max parameter for tpm2_get_capability() is uint32_t.
src/shared/tpm2-util.c