Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-03-17 17:47:35 +0000
committerAndrew Niefer2010-03-17 17:47:35 +0000
commit9d1ef0eb895d57cb2582a4052e05f74df562df85 (patch)
tree0cf0702bc655cbb7b332fad65a7e75094eb2da84
parent86e5e6607451fc1a35228caa423a80b5d02d2c21 (diff)
downloadrt.equinox.framework-9d1ef0eb895d57cb2582a4052e05f74df562df85.tar.gz
rt.equinox.framework-9d1ef0eb895d57cb2582a4052e05f74df562df85.tar.xz
rt.equinox.framework-9d1ef0eb895d57cb2582a4052e05f74df562df85.zip
Bug 305916 - launcher crashes on Linux GTK when using --launcher.defaultAction
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipse.c b/bundles/org.eclipse.equinox.executable/library/eclipse.c
index a216e6e01..cab97bd1f 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipse.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipse.c
@@ -681,7 +681,7 @@ static void processDefaultAction(int argc, _TCHAR* argv[]) {
if (_tcsicmp(defaultAction, ACTION_OPENFILE) == 0) {
int newArgc = argc + 1;
- _TCHAR ** newArgv = malloc(newArgc * sizeof(_TCHAR*));
+ _TCHAR ** newArgv = malloc((newArgc + 1) * sizeof(_TCHAR*));
newArgv[0] = argv[0];
newArgv[1] = OPENFILE;
memcpy(&newArgv[2], &argv[1], argc * sizeof(_TCHAR*));

Back to the top