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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user