* name-finder.cc (_Jv_name_finder::lookup): Check for NULL dli_sname.

From-SVN: r46280
This commit is contained in:
Bryce McKinlay 2001-10-16 07:36:12 +00:00 committed by Bryce McKinlay
parent d3a1246b2d
commit 6fd617e3e1
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2001-10-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* name-finder.cc (_Jv_name_finder::lookup): Check for NULL dli_sname.
2001-10-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/util/HashMap.java (HashEntry.clone): Removed.

View File

@ -147,10 +147,12 @@ _Jv_name_finder::lookup (void *p)
{
if (dl_info.dli_fname)
strncpy (file_name, dl_info.dli_fname, sizeof file_name);
if (dl_info.dli_sname)
strncpy (method_name, dl_info.dli_sname, sizeof method_name);
/* Don't trust dladdr() if the address is from the main program. */
if (dl_info.dli_fname != NULL
&& dl_info.dli_sname != NULL
&& (_Jv_argv == NULL || strcmp (file_name, _Jv_argv[0]) != 0))
return true;
}