Some systems, FreeBSD for example, may return negative values. sysconf() returns a long, which was being converted to a size_t. This conversion lead to large allocations, and subsequent out of memory failures. This commit checks the long value returned by sysconf() properly, and uses a default value of 4096 if a negative number is returned. PR-URL: https://github.com/libuv/libuv/pull/389 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> |
||
|---|---|---|
| .. | ||
| unix | ||
| win | ||
| fs-poll.c | ||
| heap-inl.h | ||
| inet.c | ||
| queue.h | ||
| threadpool.c | ||
| uv-common.c | ||
| uv-common.h | ||
| version.c | ||