Commit d21e32a0 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Use correct type of pointer in SafeArrayCreateVector to avoid memory

corruption. Add traces.
parent f0df2b2c
......@@ -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) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment