summaryrefslogtreecommitdiffstats
path: root/gettext-tools
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2013-07-11 08:15:11 +0900
committerDaiki Ueno <ueno@gnu.org>2013-07-11 08:16:28 +0900
commit823ccc1ff77a3b6d4f202597c84c3ff334e42356 (patch)
treea073421ca01c50dc186315a2e1d7775ce0c7aa25 /gettext-tools
parent6c0abd26de617b218e86360885c1a6674fe1a4ea (diff)
downloadexternal_gettext-823ccc1ff77a3b6d4f202597c84c3ff334e42356.zip
external_gettext-823ccc1ff77a3b6d4f202597c84c3ff334e42356.tar.gz
external_gettext-823ccc1ff77a3b6d4f202597c84c3ff334e42356.tar.bz2
lua: fix crash when parsing '..' with non-string argument
Reported by Koen Dergent at <http://savannah.gnu.org/bugs/?39458>. * x-lua.c (extract_balanced): Skip stray '..'.
Diffstat (limited to 'gettext-tools')
-rw-r--r--gettext-tools/src/ChangeLog6
-rw-r--r--gettext-tools/src/x-lua.c1
-rw-r--r--gettext-tools/tests/ChangeLog4
-rwxr-xr-xgettext-tools/tests/xgettext-lua-15
4 files changed, 16 insertions, 0 deletions
diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog
index 5077d86..430e0fa 100644
--- a/gettext-tools/src/ChangeLog
+++ b/gettext-tools/src/ChangeLog
@@ -1,3 +1,9 @@
+2013-07-11 Daiki Ueno <ueno@gnu.org>
+
+ Fix crash when parsing '..' with non-string argument.
+ Reported by Koen Dergent at <http://savannah.gnu.org/bugs/?39458>.
+ * x-lua.c (extract_balanced): Skip stray '..'.
+
2013-06-27 Daiki Ueno <ueno@gnu.org>
* 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 7a21258..9fcc20d 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 40cf531..e342d7f 100644
--- a/gettext-tools/tests/ChangeLog
+++ b/gettext-tools/tests/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-11 Daiki Ueno <ueno@gnu.org>
+
+ * xgettext-lua-1: Add test case for string concatenation.
+
2013-07-10 Daiki Ueno <ueno@gnu.org>
gettext-tools: convert tests to use init.sh from Gnulib
diff --git a/gettext-tools/tests/xgettext-lua-1 b/gettext-tools/tests/xgettext-lua-1
index 98270df..d70dd2c 100755
--- a/gettext-tools/tests/xgettext-lua-1
+++ b/gettext-tools/tests/xgettext-lua-1
@@ -22,6 +22,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"
@@ -66,6 +68,9 @@ msgstr ""
msgid "?*"
msgstr ""
+
+msgid "abcdef"
+msgstr ""
EOF
: ${DIFF=diff}