mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +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…
Reference in New Issue
Block a user