Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Libuv was using _POSIX_PATH_MAX wrong. Bug introduced in commit b56d279 ("unix: do not require PATH_MAX to be defined") from September 2018. _POSIX_PATH_MAX is the minimum max path size guaranteed by POSIX, not the actual max path size of the system libuv runs on. _POSIX_PATH_MAX is always 256, the real max is often much bigger. This commit fixes buffer overruns when processing very long paths in uv_fs_readlink() and uv_fs_realpath() because libuv was not allocating enough memory to store the result. Fixes: #2965 PR-URL: #2966 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
- Loading branch information