]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
c: Fix octal character escape handling
authorDaiki Ueno <ueno@gnu.org>
Mon, 29 Sep 2014 23:25:44 +0000 (08:25 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 29 Sep 2014 23:26:51 +0000 (08:26 +0900)
* gettext-tools/src/x-c.c (literalstring_parse): Fix octal character
escape handling.
Reported by Kjartan Maraas at:
<https://bugzilla.redhat.com/show_bug.cgi?id=1147535>.

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

index ca6100fc0859d96cb31581baf491d9d842e3f25b..f605cb815b56eb776b0b679ce660981b75df992c 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-30  Daiki Ueno  <ueno@gnu.org>
+
+       * x-c.c (literalstring_parse): Fix octal character escape handling.
+       Reported by Kjartan Maraas at:
+       <https://bugzilla.redhat.com/show_bug.cgi?id=1147535>.
+
 2014-09-24  Daiki Ueno  <ueno@gnu.org>
 
        * x-python.c (x_python_lex): Move 'token3' variable declaration
index 479b8e8f6853569a37e9a2cf4cd5b0ca630d5568..a5978c9f63764a1f320df5e92567dc26d274d291 100644 (file)
@@ -996,7 +996,8 @@ literalstring_parse (const char *string, lex_pos_ty *pos,
               for (n = 0, j = 0; j < 3; ++j)
                 {
                   n = n * 8 + c - '0';
-                  switch (*++p)
+                  c = *++p;
+                  switch (c)
                     {
                     default:
                       break;