From 6512d9e2eac343c8419f61866ec7b866e19bf2c4 Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Wed, 1 Apr 2009 02:44:49 +0900 Subject: [PATCH] Add check for invalid numbers. If there are some characters after TCC parses a number, it is an error. This bug was reported on list: http://www.mail-archive.com/tinycc-devel@nongnu.org/msg02014.html --- tcc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcc.c b/tcc.c index 9da82607..ceca30f7 100644 --- a/tcc.c +++ b/tcc.c @@ -3660,6 +3660,8 @@ void parse_number(const char *p) else tokc.ull = n; } + if (ch) + error("invalid number\n"); }