scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 8adb487c31627692c9e706a5756b38fb54193be3
parent 54a70620b35380cf2ad6e225e6f8fdc522e6848a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 10 Oct 2024 12:25:30 +0200

cc1: Fix plus 1 error terminating string

Diffstat:
Msrc/cmd/cc/cc1/expr.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmd/cc/cc1/expr.c b/src/cmd/cc/cc1/expr.c @@ -665,7 +665,7 @@ adjstrings(Symbol *sym) s = xrealloc(s, len + n); memcpy(s + len - 1, t, n); - s[len + n] = '\0'; + s[len + n - 1] = '\0'; } if (tp->n.elem != len) {