From fc71572aad9d12209ae608ef3e9c0bfff2a9fc4c Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Wed, 26 Nov 2014 20:55:22 +0100 Subject: [PATCH] BIFScanner: Make filename->symbol transformation more robust When trying to build bro from a path that contained a plus sign, an invalid symbol name for the #ifdef guard was generated. --- src/builtin-func.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/builtin-func.l b/src/builtin-func.l index 076d2bf99b..68f627fd53 100644 --- a/src/builtin-func.l +++ b/src/builtin-func.l @@ -1,4 +1,5 @@ %{ +#include #include #include #include "bif_arg.h" @@ -223,7 +224,7 @@ void init_alternative_mode() for ( char* p = guard; *p; p++ ) { - if ( strchr("/.-", *p) ) + if ( !isalnum (*p) ) *p = '_'; }