From: Daiki Ueno Date: Wed, 10 Jul 2013 23:15:11 +0000 (+0900) Subject: lua: fix crash when parsing '..' with non-string argument X-Git-Tag: v0.18.3.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05191b3c1dee30e0df5cf0204ad868f28d0b6cce;p=thirdparty%2Fgettext.git lua: fix crash when parsing '..' with non-string argument Reported by Koen Dergent at . * x-lua.c (extract_balanced): Skip stray '..'. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 5077d86fd..430e0faff 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2013-07-11 Daiki Ueno + + Fix crash when parsing '..' with non-string argument. + Reported by Koen Dergent at . + * x-lua.c (extract_balanced): Skip stray '..'. + 2013-06-27 Daiki Ueno * x-python.c (phase5_pushback): Increment size to 2. diff --git a/gettext-tools/src/x-lua.c b/gettext-tools/src/x-lua.c index 7a2125811..9fcc20d52 100644 --- a/gettext-tools/src/x-lua.c +++ b/gettext-tools/src/x-lua.c @@ -1166,6 +1166,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim, continue; case token_type_dot: + case token_type_doubledot: case token_type_operator1: case token_type_operator2: case token_type_number: diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index f5dba31fb..e342d7fbd 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,15 @@ +2013-07-11 Daiki Ueno + + * xgettext-lua-1: Add test case for string concatenation. + +2013-07-10 Daiki Ueno + + gettext-tools: convert tests to use init.sh from Gnulib + * Makefile.am (TESTS_ENVIRONMENT): Don't define LIBTOOL envvar + since it contains a relative path which cannot easily modified by + init.sh-using tests. Set it in the tests instead. + * *: convert to use init.sh. + 2013-07-07 Daiki Ueno * lang-javascript: Fix gjs module checks. diff --git a/gettext-tools/tests/xgettext-lua-1 b/gettext-tools/tests/xgettext-lua-1 index bad25b461..b2233ab5b 100755 --- a/gettext-tools/tests/xgettext-lua-1 +++ b/gettext-tools/tests/xgettext-lua-1 @@ -21,6 +21,8 @@ print(_["nope"]) print(_("\097")) print(_("\x3F\z \x2a")) +print(_("abc" .. "def")) +print(speed / 1000 .. 'Mbps') EOF tmpfiles="$tmpfiles xg-lu-1.tmp.po xg-lu-1.po" @@ -65,6 +67,9 @@ msgstr "" msgid "?*" msgstr "" + +msgid "abcdef" +msgstr "" EOF : ${DIFF=diff}