Don't invoke addr2line if dladdr() did not yield a filename
authorMartin Willi <martin@revosec.ch>
Mon, 4 Mar 2013 14:50:21 +0000 (15:50 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 4 Mar 2013 14:50:21 +0000 (15:50 +0100)
src/libstrongswan/utils/backtrace.c

index 05851c2..4557198 100644 (file)
@@ -407,7 +407,7 @@ METHOD(backtrace_t, log_, void,
                                                esc(file, TTY_FG_YELLOW), info.dli_fname,
                                                esc(file, TTY_FG_DEF), info.dli_fbase, this->frames[i]);
                        }
-                       if (detailed)
+                       if (detailed && info.dli_fname[0])
                        {
                                print_sourceline(file, (char*)info.dli_fname, ptr);
                        }