From 84d304caab1718d972b9ddd4dbfa80c680aed4d7 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 12 Feb 2004 22:59:11 +0000 Subject: [PATCH] Finally found this one: Recursive functions should not have static variables inside them. I should know that... ==32504== ==32504== Source and destination overlap in strcat(0x818ce00, 0x818ce03) ==32504== at 0x4001FE12: strcat (mac_replace_strmem.c:87) ==32504== by 0x80E8FDC: addtoken (common/util/umlaut.c:95) ==32504== by 0x80E9029: addtoken (common/util/umlaut.c:92) ==32504== by 0x80E9029: addtoken (common/util/umlaut.c:92) --- src/common/util/umlaut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/util/umlaut.c b/src/common/util/umlaut.c index f3c950473..1f2f9c8ed 100644 --- a/src/common/util/umlaut.c +++ b/src/common/util/umlaut.c @@ -39,7 +39,6 @@ typedef struct tref { void addtoken(tnode * root, const char* str, void * id) { - static char zText[1024]; static struct replace { char c; const char * str; @@ -92,6 +91,7 @@ addtoken(tnode * root, const char* str, void * id) addtoken(next->node, str+1, id); while (replace[i].str) { if (*str==replace[i].c) { + char zText[1024]; strcat(strcpy(zText, replace[i].str), str+1); addtoken(root, zText, id); break;