diff options
author | Andrew Niefer | 2008-04-03 20:11:51 +0000 |
---|---|---|
committer | Andrew Niefer | 2008-04-03 20:11:51 +0000 |
commit | 7ba83663f17b28bb111bdf7a818d068ac3c7eb81 (patch) | |
tree | 531a16f1759c4d8671f1e18efa33dac1e124a6ff /bundles/org.eclipse.equinox.executable/library/eclipseCommon.c | |
parent | 84ac415d836f01c60d420f9d3fb8594b237307f8 (diff) | |
download | rt.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.c | 10 |
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; |