From fdd8a3bf4755479ad92de08a3f9765baa4e859ad Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Sun, 30 Sep 2018 20:43:13 -0400 Subject: [PATCH] Do not halt on unterminated parameter list in C code If we see an unterminated parameter list in the code being analyzed, continue to warn, but treat it as an empty list and continue. That say, we can try to process at least some of the code. This fixes bug report #12 TypeError raised for incomplete source code from philipp created: 2018-03-10. Signed-off-by: David A. Wheeler --- flawfinder | 1 + 1 file changed, 1 insertion(+) diff --git a/flawfinder b/flawfinder index b0a5f4b..641b96f 100755 --- a/flawfinder +++ b/flawfinder @@ -574,6 +574,7 @@ def extract_c_parameters(text, pos=0): i = i + 1 internal_warn("Parsing failed to find end of parameter list in %s" % text[pos:pos + 200]) + return [] # Treat unterminated list as an empty list # These patterns match gettext() and _() for internationalization.