More security in gcc.c

As strange as it looks, i have found more errors that could lead to
security issues in gcc.c.
It should be applied on other branches too.