mirror of https://github.com/thesofproject/sof.git
Merge pull request #646 from tlauda/topic/fix-257
rimage: fix possible buffer overflow
This commit is contained in:
commit
d189651d28
|
@ -97,7 +97,7 @@ int pkcs_v1_5_sign_man_v1_5(struct image *image,
|
|||
if (!image->key_name)
|
||||
sprintf(path, "%s/otc_private_key.pem", PEM_KEY_PREFIX);
|
||||
else
|
||||
strcpy(path, image->key_name);
|
||||
strncpy(path, image->key_name, 256);
|
||||
|
||||
fprintf(stdout, " pkcs: signing with key %s\n", path);
|
||||
fp = fopen(path, "r");
|
||||
|
|
Loading…
Reference in New Issue