[KSUSER] Improve pointer arithmetics

This commit is contained in:
Timo Kreuzer 2017-12-28 18:35:30 +01:00
parent 944aba1fcc
commit 06e631fafe

View file

@ -195,7 +195,7 @@ KsCreatePin(HANDLE FilterHandle,
PHANDLE ConnectionHandle)
{
ULONG BufferSize = sizeof(KSPIN_CONNECT);
PKSDATAFORMAT DataFormat = ((PKSDATAFORMAT) ((ULONG_PTR)Connect + sizeof(KSPIN_CONNECT)));
PKSDATAFORMAT DataFormat = (PKSDATAFORMAT)(Connect + 1);
BufferSize += DataFormat->FormatSize;