Update digsig_asymmetric.c

Using snprintf instead of sprintf can help prevent buffer overflows
This commit is contained in:
Alex Persson 2024-04-05 00:47:52 +02:00 committed by GitHub
parent c85af715ca
commit 3f2afef365
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,7 @@ static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid)
struct key *key;
char name[12];
sprintf(name, "id:%08x", keyid);
snprintf(name, sizeof(name), "id:%08x", keyid);
pr_debug("key search: \"%s\"\n", name);