From a390956176e1fa93e0952b515f15b6104920e57c Mon Sep 17 00:00:00 2001 From: "ramiro%netscape.com" Date: Thu, 24 Sep 1998 09:27:37 +0000 Subject: [PATCH] Fix classic off-by-one strcat buffer error. Thanks to Michael O'Reilly for providing the fix. git-svn-id: svn://10.0.0.236/trunk@10911 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libreg/src/vr_stubs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/modules/libreg/src/vr_stubs.c b/mozilla/modules/libreg/src/vr_stubs.c index b17b3a1c400..7fc787876e9 100644 --- a/mozilla/modules/libreg/src/vr_stubs.c +++ b/mozilla/modules/libreg/src/vr_stubs.c @@ -384,7 +384,7 @@ extern void vr_findGlobalRegName () char *def = NULL; char *home = getenv("HOME"); if (home != NULL) { - def = (char *) XP_ALLOC(XP_STRLEN(home) + XP_STRLEN(DEF_REG)); + def = (char *) XP_ALLOC(XP_STRLEN(home) + XP_STRLEN(DEF_REG)+1); if (def != NULL) { XP_STRCPY(def, home); XP_STRCAT(def, DEF_REG);