Commit 1a0f1f5d authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

shdocvw/tests: Fix a test on IE 5.x.

parent 7130f977
......@@ -112,12 +112,16 @@ static void test_URLSubRegQueryA(void)
ok((hr == S_OK) && !used,
"got 0x%x and %d (expected S_OK and 0)\n", hr, used);
/* size of buffer is 0, but the function still succeed */
/* size of buffer is 0, but the function still succeed.
buffer[0] is cleared in IE 5.01 and IE 5.5 (Buffer Overflow) */
memset(buffer, '#', sizeof(buffer)-1);
buffer[sizeof(buffer)-1] = '\0';
hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, 0, -1);
used = lstrlenA(buffer);
ok((hr == S_OK) && (used == INTERNET_MAX_URL_LENGTH - 1), "got 0x%x and %d\n", hr, used);
ok( (hr == S_OK) &&
((used == INTERNET_MAX_URL_LENGTH - 1) || broken(used == 0)) ,
"got 0x%x and %d (expected S_OK and INTERNET_MAX_URL_LENGTH - 1)\n",
hr, used);
/* still succeed without a buffer for the result */
hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, 0, -1);
......
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