diff options
author | 2023-05-12 00:21:24 +0000 | |
---|---|---|
committer | 2023-05-12 00:21:24 +0000 | |
commit | 1b287f39a58b67aedef24ffd8919f35839e5f065 (patch) | |
tree | 59d3c31c313a427ec850353b079414ec8afe2f40 /libs/binder/RpcServer.cpp | |
parent | 8108f4181f846cd83a6023592921106fdbbc2c42 (diff) | |
parent | a201336bf90504ab48130ea0344690d6d803d1ea (diff) |
Merge "Fix the Nullable pointer is dereferenced issue"
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r-- | libs/binder/RpcServer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index 1635e2a3c4..bd85c7758f 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp @@ -81,6 +81,7 @@ status_t RpcServer::setupInetServer(const char* address, unsigned int port, auto aiStart = InetSocketAddress::getAddrInfo(address, port); if (aiStart == nullptr) return UNKNOWN_ERROR; for (auto ai = aiStart.get(); ai != nullptr; ai = ai->ai_next) { + if (ai->ai_addr == nullptr) continue; InetSocketAddress socketAddress(ai->ai_addr, ai->ai_addrlen, address, port); if (status_t status = setupSocketServer(socketAddress); status != OK) { continue; |