Home
       cc1: Fix plus 1 error terminating string - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 8adb487c31627692c9e706a5756b38fb54193be3
   DIR parent 54a70620b35380cf2ad6e225e6f8fdc522e6848a
  HTML 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:
         M src/cmd/cc/cc1/expr.c               |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
   DIR 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) {