aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-07-22 13:21:51 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 16:50:59 +0100
commit43a1751b21bcf6266987635a1cbbb542a15a3dfa (patch)
treedd615a44e01111ba586e0f6350479173e169daab /api
parentapi: do the set-quiet-install later (diff)
downloadwintun-43a1751b21bcf6266987635a1cbbb542a15a3dfa.tar.xz
wintun-43a1751b21bcf6266987635a1cbbb542a15a3dfa.zip
api: fix SPDRP_DEVICEDESC zero-termination
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api')
-rw-r--r--api/devmgmt.c2
1 files changed, 1 insertions, 1 deletions
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;