mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-02 14:35:29 +00:00
Reduce socket name length
Some detectors simply ban long abstract sockets
This commit is contained in:
parent
d19f65ce4a
commit
b2cb2b8b75
@ -24,7 +24,7 @@ static void patch_socket_name(const char *path) {
|
|||||||
mmap_rw(path, buf, size);
|
mmap_rw(path, buf, size);
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
if (memcmp(buf + i, MAIN_SOCKET, sizeof(MAIN_SOCKET)) == 0) {
|
if (memcmp(buf + i, MAIN_SOCKET, sizeof(MAIN_SOCKET)) == 0) {
|
||||||
gen_rand_str(buf + i, sizeof(MAIN_SOCKET));
|
gen_rand_str(buf + i, 16);
|
||||||
i += sizeof(MAIN_SOCKET);
|
i += sizeof(MAIN_SOCKET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user