From 92e7c0979a51c08a3368d7c1611e985e12b094b0 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Sun, 25 Sep 2016 16:57:55 +0000 Subject: [PATCH] [NTDLL_APITEST] Add test for invalid pointer svn path=/trunk/; revision=72801 --- rostests/apitests/ntdll/RtlAllocateHeap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); }