win: fix buffer overflow in fs events
win: fix buffer overflow in fs events

When converting an absolute path to a relative path on Windows,
uv_relative_path assumed that the relative path could be no longer than
MAX_PATH characters, and would allocate a buffer of MAX_PATH characters
for the relative path.

However, where a recursive watch is started for a directory using a UNC
path, and where events within that directory occur for pathnames longer
than MAX_PATH, it is possible for the relative path to exceed MAX_PATH
characters and overflow the buffer.

This commit fixes uv_relative_path to allocate a buffer for the exact
number of characters counted in the relative path.

Fixes: https://github.com/libuv/libuv/issues/693
PR-URL: https://github.com/libuv/libuv/pull/699
Reviewed-By: Ben Noordhuis <59bd0a3ff43b32849b319e645d4798d8a5d1e889@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <8a7991f6950ea189abf159d6ec98d2fcc13dc5f6@gmail.com>

unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso