From 43a1751b21bcf6266987635a1cbbb542a15a3dfa Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 22 Jul 2020 13:21:51 +0200 Subject: api: fix SPDRP_DEVICEDESC zero-termination Signed-off-by: Simon Rozman --- api/devmgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/devmgmt.c b/api/devmgmt.c index c4ef0e2..83a14be 100644 --- a/api/devmgmt.c +++ b/api/devmgmt.c @@ -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; -- cgit v1.2.3-59-g8ed1b