scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit cff1e86a7f61535db92a132d29fce0e805c8e529
parent e1f34328f525289ed96ef82a644ce1abd6916c4e
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed,  5 Oct 2016 14:06:35 +0200

[cc2] Improve overflow check in cc2

Diffstat:
Mcc2/symbol.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc2/symbol.c b/cc2/symbol.c @@ -50,7 +50,7 @@ getsym(unsigned id) Symbol **htab, *sym; static unsigned short num; - if (id > USHRT_MAX) + if (id >= USHRT_MAX) error(EBADID); htab = &symtab[id & NR_SYMHASH-1];