diff options
author | Leo Ufimtsev | 2018-01-19 19:27:38 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-01-23 05:26:12 +0000 |
commit | 6ac11ebbb77fe77f89880d2f075daf2ac0c81d4b (patch) | |
tree | 99acb7a34109d4a991812c1486f532c22a7a9e9b /bundles/org.eclipse.equinox.launcher.gtk.linux.arm/build.properties | |
parent | 0ee18f4293e79413c1c4dc4418a16f867ae570ca (diff) | |
download | rt.equinox.framework-6ac11ebbb77fe77f89880d2f075daf2ac0c81d4b.tar.gz rt.equinox.framework-6ac11ebbb77fe77f89880d2f075daf2ac0c81d4b.tar.xz rt.equinox.framework-6ac11ebbb77fe77f89880d2f075daf2ac0c81d4b.zip |
Bug 529695 --launcher.openFile with relative path crashes
Crash is caused due to a null pointer.
program (path) is a global var. It's being read by strlen before it's
set.
eclispe.c:417:run()
-> parseArgs()
-> next = checkPath(next, getProgramDir(), 0);
checkPath() :
paths[1] = .. programDir;
buffer = malloc(.. _tcslen(paths[1])...) << strlen on a null.
But it's only set later:
eclispe.c:417:run()
-> parseArgs() << used here.
-> _run() {
-> program = _tcsdup( argv[0] ); << set here.
}
Solution is fairly trivial, just set "program" before it's used.
Verified on Linux Fedora 27. I don't see it causing issues on other
platforms, it's a very minor fix. Should probably be good to merge.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=529695
Change-Id: I379970ecce553ef4f78a246a96ee9ac647471739
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.launcher.gtk.linux.arm/build.properties')
0 files changed, 0 insertions, 0 deletions