joyent/libuv — pull request #1392 by lilohuang (2014-08-03 08:33:02+00:00)
Title: * windows: fix buffer overflow issue of uv__getnameinfo_work()

According to MSDN page (http://msdn.microsoft.com/en-us/library/windows/desktop/ms738531.aspx), "NodeBufferSize" and "ServiceBufferSize" parameters of GetNameInfoW() function are expected to fill the number of WCHAR, not the buffer size of memory layout.

Assume the value of NI_MAXHOST is 1025, and "sizeof(host)" would get 2050. A buffer overflow issue will be triggered by it.