diff options
| author | Peter Jones <pjones@redhat.com> | 2018-03-20 16:27:42 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2018-03-20 16:28:57 -0400 |
| commit | f391e44516d24cebf3cc6b1a548e13122d083e77 (patch) | |
| tree | a908e4efa7ba024fbac207f067d6c6ae7a91e894 | |
| parent | ad6f1747b56f4fb9c706cae29570655f6a15b078 (diff) | |
| download | efi-boot-shim-f391e44516d24cebf3cc6b1a548e13122d083e77.tar.gz efi-boot-shim-f391e44516d24cebf3cc6b1a548e13122d083e77.zip | |
Revert "MokManager: stop using StrnCat"
This reverts commit 6aa5a62515d62139a2d3b34626fac8910e864a3d.
Everything Hans said was correct. But StrnCat() is in gnu-efi 3.0.8,
and using just StrCpy() here confuses coverity. I'd rather have a CI
page that's not completely full of chaff, but a little bit of redundancy
in the code.
Signed-off-by: Peter Jones <pjones@redhat.com>
| -rw-r--r-- | MokManager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MokManager.c b/MokManager.c index 1bf2333c..cd569b6d 100644 --- a/MokManager.c +++ b/MokManager.c @@ -1913,7 +1913,8 @@ static BOOLEAN check_der_suffix(CHAR16 * file_name) if (!file_name || StrLen(file_name) <= 4) return FALSE; - StrCpy(suffix, file_name + StrLen(file_name) - 4); + suffix[0] = '\0'; + StrnCat(suffix, file_name + StrLen(file_name) - 4, 4); StrLwr(suffix); for (i = 0; der_suffix[i] != NULL; i++) { |
