Update libuv

This commit is contained in:
KimLS
2017-02-25 14:30:35 -08:00
parent d402b25d69
commit 6033f48b47
115 changed files with 4304 additions and 893 deletions
+23 -1
View File
@@ -41,13 +41,35 @@ static void set_title(const char* title) {
}
static void uv_get_process_title_edge_cases() {
char buffer[512];
int r;
/* Test a NULL buffer */
r = uv_get_process_title(NULL, 100);
ASSERT(r == UV_EINVAL);
/* Test size of zero */
r = uv_get_process_title(buffer, 0);
ASSERT(r == UV_EINVAL);
/* Test for insufficient buffer size */
r = uv_get_process_title(buffer, 1);
ASSERT(r == UV_ENOBUFS);
}
TEST_IMPL(process_title) {
#if defined(__sun) || defined(_AIX)
#if defined(__sun)
RETURN_SKIP("uv_(get|set)_process_title is not implemented.");
#else
/* Check for format string vulnerabilities. */
set_title("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s");
set_title("new title");
/* Check uv_get_process_title() edge cases */
uv_get_process_title_edge_cases();
return 0;
#endif
}