mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +00:00
Return empty on failure to get context
This commit is contained in:
parent
3219d945f5
commit
d7776f6597
@ -27,7 +27,7 @@ bool get_client_cred(int fd, sock_cred *cred) {
|
|||||||
char buf[4096];
|
char buf[4096];
|
||||||
len = sizeof(buf);
|
len = sizeof(buf);
|
||||||
if (getsockopt(fd, SOL_SOCKET, SO_PEERSEC, buf, &len) != 0)
|
if (getsockopt(fd, SOL_SOCKET, SO_PEERSEC, buf, &len) != 0)
|
||||||
return false;
|
len = 0;
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
cred->context = buf;
|
cred->context = buf;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user