From: Shivani Bhardwaj Date: Wed, 28 Nov 2018 15:07:25 +0000 (+0530) Subject: Fix missing null check X-Git-Tag: 1.1.0rc1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a30c998b2d214566cbf9f570c930fecb9c1e502;p=thirdparty%2Fsuricata-update.git Fix missing null check Coverity discovered a missing null check for the variable `val`. Fix that by adding the appropriate checks for it. Closes redmine ticket #2676 --- diff --git a/suricata/update/rule.py b/suricata/update/rule.py index a400e3f..8474b68 100644 --- a/suricata/update/rule.py +++ b/suricata/update/rule.py @@ -310,7 +310,7 @@ def parse(buf, group=None): elif name == "reference": rule.references.append(val) elif name == "msg": - if val.startswith('"') and val.endswith('"'): + if val and val.startswith('"') and val.endswith('"'): val = val[1:-1] rule[name] = val else: