Re: [PATCH 2/2] winhttp: Also pass hostname to jsproxy
31 Aug
2016
31 Aug
'16
8:08 p.m.
On 31.08.2016 22:21, Andrew Eikum wrote:
+static inline char *strdupWA_sized( const WCHAR *src, DWORD size ) +{ + char *dst = NULL; + if (src) + { + int len = WideCharToMultiByte( CP_ACP, 0, src, size, NULL, 0, NULL, NULL ) + 1; + if ((dst = heap_alloc( len ))) + { + WideCharToMultiByte( CP_ACP, 0, src, len, dst, size, NULL, NULL ); + dst[len - 1] = 0; + } + } + return dst; +} +
This is usually called strndup* in Wine dlls. Also 'len' and 'size' seem to be misplaced, and I'm not sure it will do the right thing if for negative size, unless it's not meant to ever be negative.
3389
Age (days ago)
3389
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nikolay Sivov