]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Perl: Avoid unbounded nesting_depth growth, part 4.
authorBruno Haible <bruno@clisp.org>
Mon, 18 Sep 2023 18:04:47 +0000 (20:04 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Sep 2023 02:11:34 +0000 (04:11 +0200)
commit92d6e980b9784276171e580b57d132adba317882
tree4a0696c7041f121f1cdbeafb7b5b99161151ade8
parentb42074149e34a730beac5126d27b4cb1c6996d47
xgettext: Perl: Avoid unbounded nesting_depth growth, part 4.

* gettext-tools/src/x-perl.c: Improve parsing of array dereferences.
(extract_variable): After parsing a braced {variable_name}, increment
varbody_length, so as to not parse the following character. If this character
is a closing parenthesis, is would disturb the enclosing extract_balanced call.

Test case:
==========================================
sub in_multi_expanded($)
{
  if (@{$self}) {
  }
}
==========================================
gettext-tools/src/x-perl.c