From 7bbdfe6cc02d03fbcfb09b3a3d22d073a0837f47 Mon Sep 17 00:00:00 2001 From: stegerg Date: Fri, 4 May 2007 18:28:28 +0000 Subject: [PATCH] ExpandEnvName() must allocate one more byte, otherwise mem trash. git-svn-id: https://svn.aros.org:8080/svn/aros/trunk/AROS@25995 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/system/Wanderer/wanderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench/system/Wanderer/wanderer.c b/workbench/system/Wanderer/wanderer.c index 0f2db0238..8366c007a 100644 --- a/workbench/system/Wanderer/wanderer.c +++ b/workbench/system/Wanderer/wanderer.c @@ -719,7 +719,7 @@ STRPTR ExpandEnvName(STRPTR env_path) if (ok) { - if ((fullpath = AllocVec(strlen(tmp_envbuff) + strlen(env_path) - 3, MEMF_CLEAR | MEMF_PUBLIC)) != NULL) + if ((fullpath = AllocVec(strlen(tmp_envbuff) + strlen(env_path) + 1 + 1 - 4, MEMF_CLEAR | MEMF_PUBLIC)) != NULL) { strcpy(fullpath, tmp_envbuff); AddPart(fullpath, env_path + 4, 1019); -- 2.11.4.GIT