Skip to content

Commit 3cc8f4b

Browse files
cjihrigRafaelGSS
authored andcommitted
deps: update to uvwasi 0.0.13
Notable changes: - A bug has been fixed in `uvwasi_fd_readdir()` that caused the number of entries to be processed incorrectly. PR-URL: #44524 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent 4e6f786 commit 3cc8f4b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

deps/uvwasi/include/uvwasi.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern "C" {
1010

1111
#define UVWASI_VERSION_MAJOR 0
1212
#define UVWASI_VERSION_MINOR 0
13-
#define UVWASI_VERSION_PATCH 12
13+
#define UVWASI_VERSION_PATCH 13
1414
#define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \
1515
(UVWASI_VERSION_MINOR << 8) | \
1616
(UVWASI_VERSION_PATCH))

deps/uvwasi/src/uvwasi.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -1384,8 +1384,14 @@ uvwasi_errno_t uvwasi_fd_readdir(uvwasi_t* uvwasi,
13841384
}
13851385

13861386
/* Write dirent to the buffer if it will fit. */
1387-
if (UVWASI_SERDES_SIZE_dirent_t + *bufused > buf_len)
1387+
if (UVWASI_SERDES_SIZE_dirent_t + *bufused > buf_len) {
1388+
/* If there are more entries to be written to the buffer we set
1389+
* bufused, which is the return value, to the length of the buffer
1390+
* which indicates that there are more entries to be read.
1391+
*/
1392+
*bufused = buf_len;
13881393
break;
1394+
}
13891395

13901396
uvwasi_serdes_write_dirent_t(buf, *bufused, &dirent);
13911397
*bufused += UVWASI_SERDES_SIZE_dirent_t;

0 commit comments

Comments
 (0)