From 9267182d8c43cdcebaa9242e5768525e076a87d4 Mon Sep 17 00:00:00 2001 From: fuzzelhjb Date: Tue, 7 Apr 2020 07:29:49 +0200 Subject: [PATCH] False positive fix (#2593) * only report cert-STR07-C for C11 * fix false positive for checking c89/c99 code with cert-STR07-C --- addons/cert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/cert.py b/addons/cert.py index e974a4f51..cf98c8ef2 100755 --- a/addons/cert.py +++ b/addons/cert.py @@ -317,6 +317,8 @@ def str05(data): # STR07-C # Use the bounds-checking interfaces for string manipulation def str07(data): + if(data.standards.c=='c89' or data.standards.c=='c99'): + return for token in data.tokenlist: if not isFunctionCall(token, ('strcpy', 'strcat')): continue