Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2008-04-16 16:34:13 -0400
committerAndrew Niefer2008-04-16 16:34:13 -0400
commit1179be1b2cd4287d2bde9ffa82bfa689ca1c04b9 (patch)
tree685606b8e89211270c8bf41146dac53e6176e7ed /bundles
parenta3c6a30453e5608fd925be87695f13196fa2203d (diff)
downloadrt.equinox.framework-1179be1b2cd4287d2bde9ffa82bfa689ca1c04b9.tar.gz
rt.equinox.framework-1179be1b2cd4287d2bde9ffa82bfa689ca1c04b9.tar.xz
rt.equinox.framework-1179be1b2cd4287d2bde9ffa82bfa689ca1c04b9.zip
bug 227232 - memory corruption
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipse.c b/bundles/org.eclipse.equinox.executable/library/eclipse.c
index e3a145415..4495226b9 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipse.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipse.c
@@ -1390,7 +1390,7 @@ static int processEEProps(_TCHAR* eeFile)
/* replace ${ee.home} with eeDir, loop in case there is more than one per argument */
while( (c1 = _tcsstr(argv[index], EE_HOME_VAR)) != NULL)
{
- c2 = malloc( (_tcslen(argv[index]) + _tcslen(eeDir) + 1) * sizeof(_TCHAR));
+ c2 = malloc( (_tcslen(argv[index]) + _tcslen(eeDir) + _tcslen(c1) + 1) * sizeof(_TCHAR));
*c1 = 0;
_stprintf(c2, _T_ECLIPSE("%s%s%s"), argv[index], eeDir, c1 + 10); /* ${ee.home} is 10 characters */
free(argv[index]);
@@ -1433,7 +1433,7 @@ static int processEEProps(_TCHAR* eeFile)
/* set ee.home and ee.filename variables */
argv = realloc(argv, (nEEargs + 2) * sizeof(_TCHAR*));
- c1 = malloc( (_tcslen(EE_HOME) + _tcslen(eeFile) + 1) * sizeof(_TCHAR));
+ c1 = malloc( (_tcslen(EE_HOME) + _tcslen(eeDir) + 1) * sizeof(_TCHAR));
_stprintf(c1, _T_ECLIPSE("%s%s"), EE_HOME, eeDir);
argv[nEEargs++] = c1;

Back to the top