can not find libnative-lib.so in /proc/self/maps , then crash #44
Open
Description
the source code ``` if ((fd = my_openat(AT_FDCWD, PROC_MAPS, O_RDONLY | O_CLOEXEC, 0)) != 0) {
while ((read_one_line(fd, map, MAX_LINE)) > 0) {
for (int i = 0; i < NUM_LIBS; i++) {
if (my_strstr(map, libstocheck[i]) != NULL) {
char tmp[MAX_LENGTH] = "";
char path[MAX_LENGTH] = "";
char buf[5] = "";
sscanf(map, "%s %s %s %s %s %s", tmp, buf, tmp, tmp, tmp, path);
if (buf[2] == 'x') {
size_t size = my_strlen(path) + 1;
filepaths[i] = malloc(size);
my_strlcpy(filepaths[i], path, size);
counter++;
}
}
}
if (counter == NUM_LIBS)
break;
}
my_close(fd);
} ``` will show the different result on the same device.
Metadata
Assignees
Labels
No labels