Commit 62c6d61d authored by Peter Oberndorfer's avatar Peter Oberndorfer Committed by Alexandre Julliard

dmusic: Do not write outside of array bounds.

parent 0d0bfa4c
......@@ -133,7 +133,7 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLS
This->nrofports++;
if (!This->ppPorts) This->ppPorts = HeapAlloc(GetProcessHeap(), 0, sizeof(LPDIRECTMUSICPORT) * This->nrofports);
else This->ppPorts = HeapReAlloc(GetProcessHeap(), 0, This->ppPorts, sizeof(LPDIRECTMUSICPORT) * This->nrofports);
This->ppPorts[This->nrofports] = pNewPort;
This->ppPorts[This->nrofports - 1] = pNewPort;
*ppPort = (LPDIRECTMUSICPORT) pNewPort;
return S_OK;
}
......
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