Use correct type of pointer in SafeArrayCreateVector to avoid memory

corruption. Add traces.
This commit is contained in:
Robert Shearman 2003-05-19 21:43:20 +00:00 committed by Alexandre Julliard
parent f0df2b2c51
commit d21e32a04f
1 changed files with 5 additions and 1 deletions

View File

@ -262,6 +262,8 @@ SAFEARRAY* WINAPI SafeArrayCreate(
HRESULT hRes;
USHORT cDim;
TRACE("(%d, %d, %p)\n", vt, cDims, rgsabound);
/* Validate supported VARTYPE */
if ( (vt >= LAST_VARTYPE) ||
( VARTYPE_SIZE[vt] == VARTYPE_NOT_SUPPORTED ) )
@ -859,7 +861,9 @@ SAFEARRAY* WINAPI SafeArrayCreateVector(
ULONG cElements)
{
SAFEARRAY *psa;
LPVOID *ptr;
BYTE *ptr;
TRACE("%d, %ld, %ld\n", vt, lLbound, cElements);
/* Validate supported VARTYPE */
if ( (vt >= LAST_VARTYPE) ||