linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: Christopher Li <sparse@chrisli.org>
Cc: linux-sparse@vger.kernel.org
Subject: [PATCH 1/2] Fix tokenizer for octal escape sequences
Date: Thu, 16 Dec 2010 18:14:45 +0900	[thread overview]
Message-ID: <1292490886-6238-1-git-send-email-namhyung@gmail.com> (raw)

Don't allow 8 and 9 to be included in octal escape sequences.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 tokenize.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tokenize.c b/tokenize.c
index 4c975175eccc..272974b3b844 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)
-- 
1.7.3.3.400.g93cef


             reply	other threads:[~2010-12-16  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16  9:14 Namhyung Kim [this message]
2010-12-16  9:14 ` [PATCH 2/2] Update the validation check for escape sequences Namhyung Kim
2010-12-16 19:35 ` [PATCH 1/2] Fix tokenizer for octal " Christopher Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292490886-6238-1-git-send-email-namhyung@gmail.com \
    --to=namhyung@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).