diff options
Diffstat (limited to 'plugin/rewrite/rewrite.go')
-rw-r--r-- | plugin/rewrite/rewrite.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/rewrite/rewrite.go b/plugin/rewrite/rewrite.go index c315fa73a..b676a1f2d 100644 --- a/plugin/rewrite/rewrite.go +++ b/plugin/rewrite/rewrite.go @@ -104,6 +104,9 @@ func newRule(args ...string) (Rule, error) { expectNumArgs = len(args) - 1 startArg = 2 case Stop: + if len(args) < 2 { + return nil, fmt.Errorf("stop rule must begin with a rule type") + } ruleType = strings.ToLower(args[1]) expectNumArgs = len(args) - 1 startArg = 2 |