1 $DragonFly: src/usr.bin/awk/patches/run.c.patch,v 1.1 2004/11/09 08:47:36 joerg Exp $
4 ===================================================================
5 RCS file: /home/dcvs/src/contrib/awk20040207/run.c,v
6 retrieving revision 1.1.1.1
7 diff -u -p -r1.1.1.1 run.c
8 --- run.c 17 Apr 2004 19:41:28 -0000 1.1.1.1
9 +++ run.c 31 Oct 2004 03:58:23 -0000
10 @@ -1145,13 +1145,13 @@ Cell *cat(Node **a, int q) /* a[0] cat a
14 - n2 = strlen(y->sval);
15 - s = (char *) malloc(n1 + n2 + 1);
16 + n2 = strlen(y->sval) + 1;
17 + s = (char *) malloc(n1 + n2);
19 FATAL("out of space concatenating %.15s... and %.15s...",
22 - strcpy(s+n1, y->sval);
23 + memmove(s, x->sval, n1);
24 + memmove(s+n1, y->sval, n2);