]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
python: Fix invalid memory access when concatenating strings with +
authorDaiki Ueno <ueno@gnu.org>
Wed, 24 Sep 2014 09:04:17 +0000 (18:04 +0900)
committerDaiki Ueno <ueno@gnu.org>
Wed, 24 Sep 2014 09:05:39 +0000 (18:05 +0900)
* gettext-tools/src/x-python.c (x_python_lex): Move 'token3' variable
declaration out of the internal block.

gettext-tools/src/ChangeLog
gettext-tools/src/x-python.c

index bd490dd421921538f6faff11066ca59291ebc091..ca6100fc0859d96cb31581baf491d9d842e3f25b 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-24  Daiki Ueno  <ueno@gnu.org>
+
+       * x-python.c (x_python_lex): Move 'token3' variable declaration
+       out of the internal block.
+
 2014-09-24  Daiki Ueno  <ueno@gnu.org>
 
        * filter-quote.c (BOLD_START, BOLD_END): Don't use non-portable
index 970006a99e1177ad6d413494de94eafd0c8f299c..d781ef2f4b27216634ceea89efa36254772d5eab 100644 (file)
@@ -1501,14 +1501,13 @@ x_python_lex (token_ty *tp)
       for (;;)
         {
           token_ty token2, *tp2 = NULL;
+          token_ty token3;
 
           phase5_get (&token2);
           switch (token2.type)
             {
             case token_type_plus:
               {
-                token_ty token3;
-
                 phase5_get (&token3);
                 if (token3.type == token_type_string)
                   {