fw: Check for NULL pointer in copy_name

This commit is contained in:
Mikael Ågren 2025-04-10 17:33:12 +02:00
parent 65e67b604d
commit 8562f08e2c
No known key found for this signature in database
GPG key ID: E02DA3D397792C46

View file

@ -158,6 +158,7 @@ static void compute_cdi(const uint8_t *digest, const uint8_t use_uss,
static void copy_name(uint8_t *buf, const size_t bufsiz, const uint32_t word)
{
assert(bufsiz >= 4);
assert(buf != NULL);
buf[0] = word >> 24;
buf[1] = word >> 16;