Fix classic off-by-one strcat buffer error.

Thanks to Michael O'Reilly <michael@metal.iinet.net.au> for providing the fix.


git-svn-id: svn://10.0.0.236/trunk@10911 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ramiro%netscape.com
1998-09-24 09:27:37 +00:00
parent ee5328d780
commit a390956176

View File

@@ -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);