mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 14:36:37 +00:00
Update libuv
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user