annobin/annobin-golang-spaces-in-sy...

14 lines
542 B
Diff

--- annobin.orig/annocheck/hardened.c 2021-12-02 15:27:27.325863983 +0000
+++ annobin-9.87/annocheck/hardened.c 2021-12-02 15:28:03.915609648 +0000
@@ -3108,6 +3108,10 @@ contains_suspicious_characters (const un
if (isgraph (c))
continue;
+ /* Golang allows spaces in some symbols. */
+ if (c == ' ' && (per_file.lang == LANG_GO || (per_file.seen_tools & TOOL_GO)))
+ continue;
+
/* Control characters are always suspect. So are spaces and DEL */
if (iscntrl (c) || c == ' ' || c == 0x7f)
return true;