mirror of
https://github.com/torvalds/linux
synced 2024-10-01 17:00:41 +00:00
Update digsig_asymmetric.c
Using snprintf instead of sprintf can help prevent buffer overflows
This commit is contained in:
parent
c85af715ca
commit
3f2afef365
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue