Hi Tim,
On 7/1/21 7:40 PM, Tim Clem wrote:
- /* Windows treats dwUrlLength as a maximum - if there is a null before
- that length, it stops there. */
- copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
- ret = InternetCrackUrlA("http://x.org", 13 /* includes the nul */, 0, &urlComponents);
- ok(ret, "InternetCrackUrlA failed with error %d\n", GetLastError());
- todo_wine
- ok(urlComponents.dwHostNameLength == 5,
"Expected dwHostNameLength of 5, got %d\n", urlComponents.dwHostNameLength);
That test is fine on its own, but for the fix it would be also interesting to know what happens if you pass even larger value (that is, what if the length includes some characters after trailing null byte)?
Thanks,
Jacek