Revisión | fc6e6fac1b7e22cbfd1a138faeeaf83ff0773564 (tree) |
---|---|
Tiempo | 2023-04-02 03:39:10 |
Autor | dyknon <dyknon@user...> |
Commiter | dyknon |
croak on parse error.
@@ -257,6 +257,7 @@ sub consume($$$$){ | ||
257 | 257 | sub decode($$){ |
258 | 258 | my ($self, $in) = @_; |
259 | 259 | my ($end, $value) = $self->consume("root", $in, 0); |
260 | + croak "Invalid Hjson string" if(!defined $end); | |
260 | 261 | pos($in) = $end; |
261 | 262 | croak "Garbage after Hjson value" if($in !~ /\G$wsc\z/g); |
262 | 263 | $value |