From f391e44516d24cebf3cc6b1a548e13122d083e77 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 20 Mar 2018 16:27:42 -0400 Subject: 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 --- MokManager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++) { -- cgit v1.2.3