Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e64f3e3f authored by Neil Fuller's avatar Neil Fuller
Browse files

Fix NativeCrashListener

In the move from InetUnixAddress to UnixSocketAddress
commit e9d53750 did not modify
the Os.accept() call in NativeCrashListener. It was passing
an empty InetSocketAddress.

The type could have been changed, but the peer address is
never used and it is safe to pass a null.

Bug: 3106438
Change-Id: I2a61221c4504657b3e1de848b0b493f202726126
parent 886630c0
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -123,11 +123,10 @@ final class NativeCrashListener extends Thread {
            Os.listen(serverFd, 1);
            Os.listen(serverFd, 1);


            while (true) {
            while (true) {
                InetSocketAddress peer = new InetSocketAddress();
                FileDescriptor peerFd = null;
                FileDescriptor peerFd = null;
                try {
                try {
                    if (MORE_DEBUG) Slog.v(TAG, "Waiting for debuggerd connection");
                    if (MORE_DEBUG) Slog.v(TAG, "Waiting for debuggerd connection");
                    peerFd = Os.accept(serverFd, peer);
                    peerFd = Os.accept(serverFd, null /* peerAddress */);
                    if (MORE_DEBUG) Slog.v(TAG, "Got debuggerd socket " + peerFd);
                    if (MORE_DEBUG) Slog.v(TAG, "Got debuggerd socket " + peerFd);
                    if (peerFd != null) {
                    if (peerFd != null) {
                        // Only the superuser is allowed to talk to us over this socket
                        // Only the superuser is allowed to talk to us over this socket