From 4844410de55d3fea2da86b3c7ea9b2fa687b4838 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 11 Sep 2018 22:15:11 +1200 Subject: Map: Add check for trailing garbage --- Plugin/Map.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Plugin') diff --git a/Plugin/Map.pm b/Plugin/Map.pm index 25d100d..fb37e64 100644 --- a/Plugin/Map.pm +++ b/Plugin/Map.pm @@ -57,6 +57,10 @@ sub parse_list { return ("Error: expected ], got end of line", undef) unless $nest == 0; + if ($i != length($input)) { + return ("Error: unexpected item in the bagging area (after ']')", undef); + } + return (undef, @res); } -- cgit v1.1