Merge pull request #646 from tlauda/topic/fix-257

rimage: fix possible buffer overflow
This commit is contained in:
Liam Girdwood 2018-11-29 08:36:12 +00:00 committed by GitHub
commit d189651d28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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");