From 068426fef4658a8c857b25bd2a4d3a03160ae58f Mon Sep 17 00:00:00 2001 From: "liang.he" Date: Thu, 19 Jun 2025 11:11:35 +0800 Subject: [PATCH] Remove unnecessary conversion of __wasi_addr_t to bh_sockaddr_t in sock_recv_from() (#4391) `src_addr` will be filled upon return. Before the call, its content is unpredictable. --- .../libraries/libc-wasi/sandboxed-system-primitives/src/posix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c index 4c762d381..df6817504 100644 --- a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c +++ b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c @@ -2853,8 +2853,6 @@ wasmtime_ssp_sock_recv_from(wasm_exec_env_t exec_env, struct fd_table *curfds, return error; } - wasi_addr_to_bh_sockaddr(src_addr, &sockaddr); - /* Consume bh_sockaddr_t instead of __wasi_addr_t */ ret = blocking_op_socket_recv_from(exec_env, fo->file_handle, buf, buf_len, 0, &sockaddr);