From 0333f9bcdfbf5dfa830b76a87ec95d27427a9c71 Mon Sep 17 00:00:00 2001 From: "ere%atp.fi" Date: Mon, 30 Aug 2004 19:41:03 +0000 Subject: [PATCH] Fix for bug 257314. r=mscott sr=dveditz git-svn-id: svn://10.0.0.236/trunk@161494 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/addrbook/src/nsVCardObj.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mozilla/mailnews/addrbook/src/nsVCardObj.cpp b/mozilla/mailnews/addrbook/src/nsVCardObj.cpp index 3f767cc0fc1..ead3e002426 100644 --- a/mozilla/mailnews/addrbook/src/nsVCardObj.cpp +++ b/mozilla/mailnews/addrbook/src/nsVCardObj.cpp @@ -1344,16 +1344,13 @@ static void writeAttrValue(OFile *fp, VObject *o, int* length) static void writeGroup(OFile *fp, VObject *o) { - char buf1[256]; - char buf2[256]; - PL_strcpy(buf1,NAME_OF(o)); - while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) { - PL_strcpy(buf2,STRINGZ_VALUE_OF(o)); - PL_strcat(buf2,"."); - PL_strcat(buf2,buf1); - PL_strcpy(buf1,buf2); + nsCAutoString buf(NAME_OF(o)); + + while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) { + buf.Insert(NS_LITERAL_CSTRING("."), 0); + buf.Insert(STRINGZ_VALUE_OF(o), 0); } - appendsOFile(fp,buf1); + appendsOFile(fp, buf.get()); } static int inList(const char **list, const char *s)