Commit 8b86bdbc by Adam Nemet Committed by Adam Nemet

* runtime/main.c (store_exe_path): Don't crash if argv0 is NULL.

From-SVN: r142526
parent 230f3755
2008-12-06 Adam Nemet <anemet@caviumnetworks.com>
* runtime/main.c (store_exe_path): Don't crash if argv0 is NULL.
2008-12-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/38291
......
......@@ -111,7 +111,8 @@ store_exe_path (const char * argv0)
char buf[PATH_MAX], *cwd, *path;
if (argv0[0] == '/')
/* On the simulator argv is not set. */
if (argv0 == NULL || argv0[0] == '/')
{
exe_path = argv0;
please_free_exe_path_when_done = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment