[Patch, libfortran] PR 51090 Check getenv result before proceeding
Janne Blomqvist
blomqvist.janne@gmail.com
Fri Nov 11 16:34:00 GMT 2011
Hi,
committed the patch below as obvious.
2011-11-11 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/51090
* runtime/main.c (find_addr2line): NULL check before proceeding.
Index: main.c
===================================================================
--- main.c (revision 181287)
+++ main.c (working copy)
@@ -149,6 +149,8 @@ find_addr2line (void)
#ifdef HAVE_ACCESS
#define A2L_LEN 10
char *path = getenv ("PATH");
+ if (!path)
+ return;
size_t n = strlen (path);
char ap[n + 1 + A2L_LEN];
size_t ai = 0;
--
Janne Blomqvist
More information about the Fortran
mailing list