From 3a89d3a234ed600a195ad85be892868b955b93d4 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 26 Mar 2020 23:16:46 +0000 Subject: [PATCH] 12321 change strlen to strnlen as suggested by flawfinder. --- src/country.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/country.c b/src/country.c index 45d26b8..1ca188c 100644 --- a/src/country.c +++ b/src/country.c @@ -179,7 +179,7 @@ LOC_EXPORT int loc_country_code_is_valid(const char* cc) { return 0; // It must be 2 characters long - if (strlen(cc) != 2) + if (strnlen(cc,3) != 2) return 0; // It must only contain A-Z -- 2.47.2