scc

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

commit 54f95598858aa76b912be8dc0b980070724f31f2
parent 53e82078e4f9c8450ba94ba169cce9b51d513df2
Author: Alexander Krotov <ilabdsf@yandex.ru>
Date:   Mon, 11 Apr 2016 23:31:11 +0300

[cc1] Fix NULL pointer dereference

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

diff --git a/cc1/decl.c b/cc1/decl.c @@ -216,7 +216,7 @@ krfun(Type *tp, Type *types[], Symbol *syms[], int *ntypes, int *nsyms) sym->flags |= ISAUTO; if ((sym = install(NS_IDEN, sym)) == NULL) { errorp("redefinition of parameter '%s'", - sym->name); + yylval.sym->name); continue; } if (n < NR_FUNPARAM) {