This commit is contained in:
Dmitry Samersoff 2016-03-07 20:33:26 +00:00
commit 7e6bd74172

View File

@ -336,13 +336,13 @@ char* os::build_agent_function_name(const char *sym_name, const char *lib_name,
const char *start; const char *start;
if (lib_name != NULL) { if (lib_name != NULL) {
len = name_len = strlen(lib_name); name_len = strlen(lib_name);
if (is_absolute_path) { if (is_absolute_path) {
// Need to strip path, prefix and suffix // Need to strip path, prefix and suffix
if ((start = strrchr(lib_name, *os::file_separator())) != NULL) { if ((start = strrchr(lib_name, *os::file_separator())) != NULL) {
lib_name = ++start; lib_name = ++start;
} }
if (len <= (prefix_len + suffix_len)) { if (strlen(lib_name) <= (prefix_len + suffix_len)) {
return NULL; return NULL;
} }
lib_name += prefix_len; lib_name += prefix_len;