summaryrefslogtreecommitdiff
path: root/gettext-tools/tests/xgettext-java-stackovfl-4
Commit message (Collapse)AuthorAgeFilesLines
* xgettext: In language Java, avoid stack overflow.Bruno Haible2023-03-071-0/+58
* gettext-tools/src/x-java.c (MAX_NESTING_DEPTH): New macro. (paren_nesting_depth, brace_nesting_depth): New variables. (extract_parenthesized): Increase and check paren_nesting_depth or brace_nesting_depth before calling extract_parenthesized recursively. (extract_java): Initialize paren_nesting_depth and brace_nesting_depth. * gettext-tools/tests/xgettext-java-stackovfl-1: New file. * gettext-tools/tests/xgettext-java-stackovfl-2: New file. * gettext-tools/tests/xgettext-java-stackovfl-3: New file. * gettext-tools/tests/xgettext-java-stackovfl-4: New file. * gettext-tools/tests/Makefile.am (TESTS): Add them.