Skip to content

Commit fc3e890

Browse files
authored
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.
1 parent e3b0244 commit fc3e890

File tree

1 file changed

+0
-2
lines changed
  • core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src

1 file changed

+0
-2
lines changed

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,8 +2840,6 @@ wasmtime_ssp_sock_recv_from(wasm_exec_env_t exec_env, struct fd_table *curfds,
28402840
return error;
28412841
}
28422842

2843-
wasi_addr_to_bh_sockaddr(src_addr, &sockaddr);
2844-
28452843
/* Consume bh_sockaddr_t instead of __wasi_addr_t */
28462844
ret = blocking_op_socket_recv_from(exec_env, fo->file_handle, buf, buf_len,
28472845
0, &sockaddr);

0 commit comments

Comments
 (0)