windows: WCHAR in lws_plat_inet_ntop needs double the final allocation

https://github.com/warmcat/libwebsockets/issues/619
This commit is contained in:
Andy Green 2016-09-05 15:03:37 +08:00
parent 72502e86f5
commit 64dd359192

View file

@ -468,7 +468,7 @@ lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt)
DWORD bufferlen = cnt;
BOOL ok = FALSE;
buffer = lws_malloc(bufferlen);
buffer = lws_malloc(bufferlen * 2);
if (!buffer) {
lwsl_err("Out of memory\n");
return NULL;