diff --git a/mica/micad/services/rpc/rpc_backend.c b/mica/micad/services/rpc/rpc_backend.c index b75fe45949cbb1e241addcd060c2eb74f5980480..e82f74324226cefe4bc0a82707f0019516a56a0e 100644 --- a/mica/micad/services/rpc/rpc_backend.c +++ b/mica/micad/services/rpc/rpc_backend.c @@ -4,10 +4,11 @@ * SPDX-License-Identifier: MulanPSL-2.0 */ +#define _GNU_SOURCE +#include #include #include #include -#include #include #include #include diff --git a/mica/micad/services/rpc/rpc_helper.c b/mica/micad/services/rpc/rpc_helper.c index a5396ecaf731f89cda84b83439444073f69f6be3..4c00a24a57584c5a5048f001fa8ecb63f05238c9 100644 --- a/mica/micad/services/rpc/rpc_helper.c +++ b/mica/micad/services/rpc/rpc_helper.c @@ -127,10 +127,6 @@ int decode_addrlist(const char *buf, int cnt, int buflen, struct addrinfo **out) } p->ai_canonname = NULL; if (aclen > 0) { - if (&buf[bi] == NULL) { - ret = -RPC_ECORRUPTED; - goto clean; - } p->ai_canonname = __strdup(&buf[bi]); bi += aclen; } diff --git a/mica/micad/services/rpc/rpc_workers.c b/mica/micad/services/rpc/rpc_workers.c index 28bd756e8a4e8136430a34f5afd3b8e43ef14cee..7a371079c8885e45d5ba98f57f8767910793450f 100644 --- a/mica/micad/services/rpc/rpc_workers.c +++ b/mica/micad/services/rpc/rpc_workers.c @@ -118,6 +118,7 @@ static void *worker_thread(void *args) } free(req); } + pthread_exit(NULL); } /**