mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 09:20:30 +00:00
[NTDLL_WINETEST]
CORE-6977 #comment Make sure the buffer for NtQueryInformationAtom is ULONG aligned. Fixes failed atom tests on ReactOS and Windows when compiled with GCC 4.7.2. Should be sent to wine. Keeping the jira issue open. svn path=/trunk/; revision=58378
This commit is contained in:
parent
2bab12f092
commit
a263a1faad
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
#include "ntstatus.h"
|
||||
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
|
||||
/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
|
||||
* definition errors when we get to winnt.h
|
||||
*/
|
||||
#define WIN32_NO_STATUS
|
||||
|
@ -432,7 +432,7 @@ static void test_Global(void)
|
|||
{
|
||||
NTSTATUS res;
|
||||
RTL_ATOM atom;
|
||||
char ptr[sizeof(ATOM_BASIC_INFORMATION) + 255 * sizeof(WCHAR)];
|
||||
ULONG ptr[(sizeof(ATOM_BASIC_INFORMATION) + 255 * sizeof(WCHAR) + sizeof(ULONG)) / sizeof(ULONG)];
|
||||
ATOM_BASIC_INFORMATION* abi = (ATOM_BASIC_INFORMATION*)ptr;
|
||||
ULONG ptr_size = sizeof(ATOM_BASIC_INFORMATION) + 255 * sizeof(WCHAR);
|
||||
|
||||
|
@ -445,7 +445,7 @@ static void test_Global(void)
|
|||
|
||||
memset( ptr, 0xcc, sizeof(ptr) );
|
||||
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
|
||||
ok(!res, "atom lookup\n");
|
||||
ok(!res, "atom lookup failed with status = 0x%x\n", res);
|
||||
ok(!lstrcmpW(abi->Name, testAtom1), "ok strings\n");
|
||||
ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "wrong string length\n");
|
||||
ok(abi->Name[lstrlenW(testAtom1)] == 0, "wrong string termination %x\n", abi->Name[lstrlenW(testAtom1)]);
|
||||
|
|
Loading…
Reference in a new issue