From 7441d50cd5aa354bf867f7c4b2171aef709110d4 Mon Sep 17 00:00:00 2001 From: v-chojas <25211973+v-chojas@users.noreply.github.com> Date: Mon, 8 May 2023 14:36:46 -0700 Subject: [PATCH] Fix the size of handle in SQLAllocHandle UDWORD is not the correct size of a handle on 64-bit systems and causes crash when attempting to run under pageheap/appverifier; use the SQLHANDLE instead which will be the correct size regardless of the bitness of the system. --- src/odbctest/fhhndl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/odbctest/fhhndl.c b/src/odbctest/fhhndl.c index c02ccd5..988a93d 100644 --- a/src/odbctest/fhhndl.c +++ b/src/odbctest/fhhndl.c @@ -64,7 +64,7 @@ RETCODE INTFUN lpSQLAllocHandle(STD_FH_PARMS) hInHandle=*(SQLHANDLE *)lpParms[1]->lpData; BUILDOUTPUTPARM(lpParms[2], // Allocate OutputHandlePtr - sizeof(UDWORD), // based on cbValueMax + sizeof(SQLHANDLE), // based on cbValueMax lpUsrOptions->fBufferChecking); // Log input parameters