ref: 20b4457a8bb3aca439e4d1cfa538355b6da82c56
parent: 8a80489af7127a6a9d491137e0c0901f19113fa9
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Oct 5 10:06:35 EDT 2016
[cc2] Improve overflow check in cc2
--- a/cc2/symbol.c
+++ b/cc2/symbol.c
@@ -50,7 +50,7 @@
Symbol **htab, *sym;
static unsigned short num;
- if (id > USHRT_MAX)
+ if (id >= USHRT_MAX)
error(EBADID);
htab = &symtab[id & NR_SYMHASH-1];