gettext
db16c08c - xgettext: In language Lua, avoid stack overflow.

Commit
1 year ago
xgettext: In language Lua, avoid stack overflow. * gettext-tools/src/x-lua.c: Include error-progname.h. (MAX_NESTING_DEPTH): New macro. (paren_nesting_depth, bracket_nesting_depth): New variables. (extract_balanced): Increase and check paren_nesting_depth or bracket_nesting_depth before calling extract_balanced recursively. (extract_lua): Initialize paren_nesting_depth and bracket_nesting_depth. * gettext-tools/tests/xgettext-lua-stackovfl-1: New file. * gettext-tools/tests/xgettext-lua-stackovfl-2: New file. * gettext-tools/tests/xgettext-lua-stackovfl-3: New file. * gettext-tools/tests/xgettext-lua-stackovfl-4: New file. * gettext-tools/tests/Makefile.am (TESTS): Add them.
Author
Committer
Parents
Loading