95 |
95 |
96 // lookup found_strx in the string table |
96 // lookup found_strx in the string table |
97 char * symname = mach_find_in_stringtable((char*) ((uintptr_t)mach_base + stroff), strsize, found_strx); |
97 char * symname = mach_find_in_stringtable((char*) ((uintptr_t)mach_base + stroff), strsize, found_strx); |
98 if (symname) { |
98 if (symname) { |
99 strncpy(buf, symname, buflen); |
99 strncpy(buf, symname, buflen); |
|
100 buf[buflen - 1] = '\0'; |
100 return true; |
101 return true; |
101 } |
102 } |
102 DEBUG_ONLY(tty->print_cr("no string or null string found.")); |
103 DEBUG_ONLY(tty->print_cr("no string or null string found.")); |
103 return false; |
104 return false; |
104 } |
105 } |