Re: [PATCH] wininet: NULL-terminate url string passed to InternetCrackUrlW from InternetCrackUrlA
5 Oct
2007
5 Oct
'07
2:56 p.m.
Hi Nigel, + lpwszUrl=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR)*(nLength+1)); + MultiByteToWideChar(CP_ACP,0,lpszUrl,dwUrlLength,lpwszUrl,(nLength+1)); + lpwszUrl[nLength] = 0; The last line is redundant: the HeapAlloc already zeroes the buffer. Though since MultiByteToWideChar is already overwriting the buffer, you might remove the HEAP_ZERO_MEMORY and leave this assignment. --Juan
6646
Age (days ago)
6646
Last active (days ago)
0 comments
1 participants
participants (1)
-
Juan Lang