mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 14:08:44 +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];
|
||||
len = sizeof(buf);
|
||||
if (getsockopt(fd, SOL_SOCKET, SO_PEERSEC, buf, &len) != 0)
|
||||
return false;
|
||||
len = 0;
|
||||
buf[len] = '\0';
|
||||
cred->context = buf;
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user