Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2008-04-03 20:11:51 +0000
committerAndrew Niefer2008-04-03 20:11:51 +0000
commit7ba83663f17b28bb111bdf7a818d068ac3c7eb81 (patch)
tree531a16f1759c4d8671f1e18efa33dac1e124a6ff /bundles/org.eclipse.equinox.executable/library/eclipseCommon.c
parent84ac415d836f01c60d420f9d3fb8594b237307f8 (diff)
downloadrt.equinox.framework-7ba83663f17b28bb111bdf7a818d068ac3c7eb81.tar.gz
rt.equinox.framework-7ba83663f17b28bb111bdf7a818d068ac3c7eb81.tar.xz
rt.equinox.framework-7ba83663f17b28bb111bdf7a818d068ac3c7eb81.zip
bug 223922 - crash on WPF
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/eclipseCommon.c')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseCommon.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c b/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c
index 701547085..01103a60f 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c
@@ -469,7 +469,7 @@ _TCHAR* findFile( _TCHAR* path, _TCHAR* prefix)
*/
_TCHAR* checkPath( _TCHAR* path, _TCHAR* programDir, int reverseOrder )
{
- int cwdSize = MAX_PATH_LENGTH * sizeof(_TCHAR);
+ int cwdLength = MAX_PATH_LENGTH;
int i;
_TCHAR * workingDir, * buffer, * result = NULL;
_TCHAR * paths[2];
@@ -481,10 +481,10 @@ _TCHAR* checkPath( _TCHAR* path, _TCHAR* programDir, int reverseOrder )
}
/* get the current working directory */
- workingDir = malloc(cwdSize);
- while ( _tgetcwd( workingDir, cwdSize ) == NULL ){
- cwdSize *= 2;
- workingDir = realloc(workingDir, cwdSize);
+ workingDir = malloc(cwdLength * sizeof(_TCHAR));
+ while ( _tgetcwd( workingDir, cwdLength ) == NULL ){
+ cwdLength *= 2;
+ workingDir = realloc(workingDir, cwdLength * sizeof(_TCHAR));
}
paths[0] = reverseOrder ? programDir : workingDir;

Back to the top