From: Stefan Schantl Date: Wed, 13 Dec 2017 13:53:51 +0000 (+0100) Subject: general-functions.pl: readhash() Add code to handle optional comments in files X-Git-Tag: suricata-beta3~33^2~39^2~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f5247f60cc66716de0b5b8bd14e0de118763fb5;p=people%2Fstevee%2Fipfire-2.x.git general-functions.pl: readhash() Add code to handle optional comments in files Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 0577afe280..2191768c9c 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -149,6 +149,10 @@ sub readhash while () { chop; + + # Skip comments. + next if ($_ =~ /\#/); + ($var, $val) = split /=/, $_, 2; if ($var) {