mirror of https://github.com/thesofproject/sof.git
rimage: fix possible buffer overflow
Fixes possible buffer overflow with strcpy. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
f5711ff689
commit
2a7f0c0de4
|
@ -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