Skip to content

Commit 068426f

Browse files
committed
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 2c00c30 commit 068426f

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
@@ -2853,8 +2853,6 @@ wasmtime_ssp_sock_recv_from(wasm_exec_env_t exec_env, struct fd_table *curfds,
28532853
return error;
28542854
}
28552855

2856-
wasi_addr_to_bh_sockaddr(src_addr, &sockaddr);
2857-
28582856
/* Consume bh_sockaddr_t instead of __wasi_addr_t */
28592857
ret = blocking_op_socket_recv_from(exec_env, fo->file_handle, buf, buf_len,
28602858
0, &sockaddr);

0 commit comments

Comments
 (0)