Remove outdated hammer.txt.
[dragonfly.git] / usr.bin / awk / patches / run.c.patch
blob83ec88147028bf63720c998b48ebcf20f188421b
1 $DragonFly: src/usr.bin/awk/patches/run.c.patch,v 1.1 2004/11/09 08:47:36 joerg Exp $
3 Index: /run.c
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
11 getsval(x);
12 getsval(y);
13 n1 = strlen(x->sval);
14 - n2 = strlen(y->sval);
15 - s = (char *) malloc(n1 + n2 + 1);
16 + n2 = strlen(y->sval) + 1;
17 + s = (char *) malloc(n1 + n2);
18 if (s == NULL)
19 FATAL("out of space concatenating %.15s... and %.15s...",
20 x->sval, y->sval);
21 - strcpy(s, x->sval);
22 - strcpy(s+n1, y->sval);
23 + memmove(s, x->sval, n1);
24 + memmove(s+n1, y->sval, n2);
25 tempfree(y);
26 z = gettemp();
27 z->sval = s;