advapi32: Use STATUS_BUFFER_TOO_SMALL for buffer overflows in RegQueryInfoKeyW.
This commit is contained in:
parent
f4790714fe
commit
b6c31bea3d
|
@ -865,7 +865,7 @@ LSTATUS WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPD
|
|||
|
||||
if (class_len && (info->ClassLength/sizeof(WCHAR) + 1 > *class_len))
|
||||
{
|
||||
status = STATUS_BUFFER_OVERFLOW;
|
||||
status = STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1823,7 +1823,7 @@ static void test_reg_query_info(void)
|
|||
memset(classbufferW, 0x55, sizeof(classbufferW));
|
||||
classlen = 1;
|
||||
ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
todo_wine ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret);
|
||||
ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret);
|
||||
ok(classlen == 0 /* win8 */ ||
|
||||
classlen == strlen(subkey_class), "classlen = %u\n", classlen);
|
||||
memset(expectbufferW, 0x55, sizeof(expectbufferW));
|
||||
|
@ -1846,7 +1846,7 @@ static void test_reg_query_info(void)
|
|||
memset(classbufferW, 0x55, sizeof(classbufferW));
|
||||
classlen = sizeof(subkey_class) - 1;
|
||||
ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
todo_wine ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret);
|
||||
ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret);
|
||||
ok(classlen == sizeof(subkey_class) - 2 /* win8 */ ||
|
||||
classlen == strlen(subkey_class), "classlen = %u\n", classlen);
|
||||
memset(expectbufferW, 0x55, sizeof(expectbufferW));
|
||||
|
|
Loading…
Reference in New Issue