summaryrefslogtreecommitdiff
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-01-24 00:12:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-01-24 00:12:29 +0000
commit0d40b9476fa4dfd8820ace56c8b2fa244783229b (patch)
tree930ce77252af1b7bf2113da7c2a21010f8acc9d2 /usr.bin/xlint
parent724ad703d8c462c0b366f0004c24c9884b69676f (diff)
Update length field in catstrg() with the length of the appended string.
Based on a diff from Claus Assmann. Closes PR 4073.
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/lint1/tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c
index a9669d4ba19..8bb030584c9 100644
--- a/usr.bin/xlint/lint1/tree.c
+++ b/usr.bin/xlint/lint1/tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tree.c,v 1.6 2002/02/16 21:27:59 millert Exp $ */
+/* $OpenBSD: tree.c,v 1.7 2005/01/24 00:12:28 millert Exp $ */
/* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: tree.c,v 1.6 2002/02/16 21:27:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: tree.c,v 1.7 2005/01/24 00:12:28 millert Exp $";
#endif
#include <stdlib.h>
@@ -3838,6 +3838,7 @@ catstrg(strg1, strg2)
(len2 + 1) * sizeof (wchar_t));
free(strg2->st_wcp);
}
+ strg1->st_len = len;
free(strg2);
return (strg1);