api: fix SPDRP_DEVICEDESC zero-termination

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2020-07-22 13:21:51 +02:00 committed by Jason A. Donenfeld
parent 0adf0fab8d
commit 43a1751b21

View File

@ -1030,7 +1030,7 @@ WintunCreateAdapter(
&DevInfoData,
SPDRP_DEVICEDESC,
(const BYTE *)PoolDeviceTypeName,
(DWORD)(wcslen(PoolDeviceTypeName) * sizeof(WCHAR))))
(DWORD)((wcslen(PoolDeviceTypeName) + 1) * sizeof(WCHAR))))
{
Result = GetLastError();
goto cleanupNetDevRegKey;