]> 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>
Mon, 18 Sep 2023 18:07:27 +0000 (20:07 +0200)
commit0b731f300902a473bf052344174e77bf4c93861e
treeaaedb2f30deeb92a039317819628bcfa06a1a7af
parent3166398e57152d2c8fd23785463b2da9b96e145d
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