summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2014-09-30 08:25:44 +0900
committerDaiki Ueno <ueno@gnu.org>2014-09-30 08:26:51 +0900
commit883001928eacb62fdf2a5c7da0f38e08148b0fcf (patch)
treee617bfcb3aa8c1ce3b020a7e8e2919654d472362 /gettext-tools/src
parent56791441914c42f4166257f33694942631b1dc7e (diff)
downloadexternal_gettext-883001928eacb62fdf2a5c7da0f38e08148b0fcf.zip
external_gettext-883001928eacb62fdf2a5c7da0f38e08148b0fcf.tar.gz
external_gettext-883001928eacb62fdf2a5c7da0f38e08148b0fcf.tar.bz2
c: Fix octal character escape handling
* 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>.
Diffstat (limited to 'gettext-tools/src')
-rw-r--r--gettext-tools/src/ChangeLog6
-rw-r--r--gettext-tools/src/x-c.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog
index ca6100f..f605cb8 100644
--- a/gettext-tools/src/ChangeLog
+++ b/gettext-tools/src/ChangeLog
@@ -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
diff --git a/gettext-tools/src/x-c.c b/gettext-tools/src/x-c.c
index 479b8e8..a5978c9 100644
--- a/gettext-tools/src/x-c.c
+++ b/gettext-tools/src/x-c.c
@@ -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;