aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-12-16 18:14:45 +0900
committerChristopher Li <sparse@chrisli.org>2011-01-03 02:20:26 -0800
commit19de6512c98edec3f2e09eea1aa0bc94ae762709 (patch)
treeb88b7bc810425fdaa885bb2eb831f6e6a5d8b5e3
parentc5e425e5f2f10f11c8d0f17733c87b5194e1f752 (diff)
downloadsparse-19de6512c98edec3f2e09eea1aa0bc94ae762709.tar.gz
Fix tokenizer for octal escape sequences
Don't allow 8 and 9 to be included in octal escape sequences. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--tokenize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tokenize.c b/tokenize.c
index 4c975175..272974b3 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -495,7 +495,7 @@ static int escapechar(int first, int type, stream_t *stream, int *valp)
case '0'...'7': {
int nr = 2;
value -= '0';
- while (next >= '0' && next <= '9') {
+ while (next >= '0' && next <= '7') {
value = (value << 3) + (next-'0');
next = nextchar(stream);
if (!--nr)