From: Dmitry Chapyshev Date: Sun, 25 Sep 2016 16:57:55 +0000 (+0000) Subject: [NTDLL_APITEST] Add test for invalid pointer X-Git-Tag: ReactOS-0.4.3~254 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=92e7c0979a51c08a3368d7c1611e985e12b094b0;ds=inline [NTDLL_APITEST] Add test for invalid pointer svn path=/trunk/; revision=72801 --- diff --git a/rostests/apitests/ntdll/RtlAllocateHeap.c b/rostests/apitests/ntdll/RtlAllocateHeap.c index 40ade2d2d52..829983cd395 100644 --- a/rostests/apitests/ntdll/RtlAllocateHeap.c +++ b/rostests/apitests/ntdll/RtlAllocateHeap.c @@ -62,4 +62,16 @@ START_TEST(RtlAllocateHeap) RtlDestroyHeap(hHeap); ok(Aligned == TRUE, "Unaligned address returned\n"); + + _SEH2_TRY + { + hHeap = RtlCreateHeap(HEAP_CREATE_ALIGN_16, NULL, 0, 0, NULL, (PRTL_HEAP_PARAMETERS)0xdeadbeef); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + hHeap = INVALID_HANDLE_VALUE; + } + _SEH2_END; + + ok(hHeap == NULL, "Unexpected heap value: %p\n", hHeap); }