Commit 499c5317 authored by Erich Hoover's avatar Erich Hoover Committed by Alexandre Julliard

wininet: Fix InternetCrackUrl parsing URLs containing a semicolon.

parent d5e40b0e
......@@ -1717,9 +1717,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
lpUC->nPort = INTERNET_INVALID_PORT_NUMBER;
/* Parse <params> */
lpszParam = memchrW(lpszap, ';', dwUrlLength - (lpszap - lpszUrl));
if(!lpszParam)
lpszParam = memchrW(lpszap, '?', dwUrlLength - (lpszap - lpszUrl));
lpszParam = memchrW(lpszap, '?', dwUrlLength - (lpszap - lpszUrl));
if(!lpszParam)
lpszParam = memchrW(lpszap, '#', dwUrlLength - (lpszap - lpszUrl));
......
......@@ -124,6 +124,9 @@ static const crack_url_test_t crack_url_tests[] = {
{"http://www.winehq.org?test=123",
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 0, 21, 9,
"http", "www.winehq.org", "", "", "", "?test=123"},
{"http://www.winehq.org/myscript.php;test=123",
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 22, -1, 0,
"http", "www.winehq.org", "", "", "/myscript.php;test=123", ""},
{"file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
0, 4, INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 55, -1, 0,
"file", "", "", "", "C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml", ""},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment