rimage: fix for gcc8.1 -Wstringop-truncation

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2019-01-30 07:33:30 +01:00
parent c82f759420
commit 05912c5639
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,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
strncpy(path, image->key_name, 256);
strncpy(path, image->key_name, sizeof(path) - 1);
fprintf(stdout, " pkcs: signing with key %s\n", path);
fp = fopen(path, "r");