]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
lua: fix crash when parsing '..' with non-string argument
authorDaiki Ueno <ueno@gnu.org>
Wed, 10 Jul 2013 23:15:11 +0000 (08:15 +0900)
committerDaiki Ueno <ueno@gnu.org>
Wed, 10 Jul 2013 23:16:28 +0000 (08:16 +0900)
Reported by Koen Dergent at <http://savannah.gnu.org/bugs/?39458>.
* x-lua.c (extract_balanced): Skip stray '..'.

gettext-tools/src/ChangeLog
gettext-tools/src/x-lua.c
gettext-tools/tests/ChangeLog
gettext-tools/tests/xgettext-lua-1

index 5077d86fd06968090fed0546d6e03329f979cb13..430e0faff239f98c6ccbd994254d11e08993d7a5 100644 (file)
@@ -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.
index 7a21258111c315f9c45225d8ac83754086d1484c..9fcc20d52a90c1772d9cbb6711d693b46dd3f1c0 100644 (file)
@@ -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:
index 40cf531360f570d64f298133e349514a5b28826b..e342d7fbdbb58300bf5e3eae60108bfb6c6d0639 100644 (file)
@@ -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
index 98270dfbe2e3747a9e8c9110a3a280b8103b2c7e..d70dd2c8ae2e84545507fa8e838c952e3f4dc98e 100755 (executable)
@@ -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}