Fix invalid calculation of total size of bytes to send and recv (#1162)
The total size of bytes to send and recv should be set to 0 before calculation, but not including the size of iovec_app_t structure.
This commit is contained in:
@ -154,8 +154,8 @@ recvmsg(int sockfd, struct msghdr *msg, int flags)
|
||||
// Prepare input parameters.
|
||||
__wasi_iovec_t *ri_data = NULL;
|
||||
size_t i = 0;
|
||||
size_t ro_datalen;
|
||||
__wasi_roflags_t ro_flags;
|
||||
size_t ro_datalen = 0;
|
||||
__wasi_roflags_t ro_flags = 0;
|
||||
|
||||
if (NULL == msg) {
|
||||
HANDLE_ERROR(__WASI_ERRNO_INVAL)
|
||||
|
||||
Reference in New Issue
Block a user