diff options
author | Simon Rozman <simon@rozman.si> | 2020-07-22 13:21:51 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-30 16:50:59 +0100 |
commit | 43a1751b21bcf6266987635a1cbbb542a15a3dfa (patch) | |
tree | dd615a44e01111ba586e0f6350479173e169daab /api/devmgmt.c | |
parent | api: do the set-quiet-install later (diff) | |
download | wintun-43a1751b21bcf6266987635a1cbbb542a15a3dfa.tar.xz wintun-43a1751b21bcf6266987635a1cbbb542a15a3dfa.zip |
api: fix SPDRP_DEVICEDESC zero-termination
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to '')
-rw-r--r-- | api/devmgmt.c | 2 |
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; |