diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-10-14 06:37:50 +0000 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-10-14 06:51:22 +0000 |
commit | 470bdf3e26e433032fe7986f379cad797cdd94cd (patch) | |
tree | 73ae00e01e47eebbb8776a26c4e1aeb43e3c7517 /api/adapter.c | |
parent | api: adapter: handle cases explicitly in dev query callback (diff) | |
download | wintun-470bdf3e26e433032fe7986f379cad797cdd94cd.tar.xz wintun-470bdf3e26e433032fe7986f379cad797cdd94cd.zip |
api: use proper instance id bounds
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'api/adapter.c')
-rw-r--r-- | api/adapter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/adapter.c b/api/adapter.c index ab79f0c..0dd8c42 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -523,7 +523,7 @@ DeviceCreateCallback( SW_DEVICE_CREATE_CTX *Ctx = Context; Ctx->CreateResult = CreateResult; if (DeviceInstanceId) - wcsncpy_s(Ctx->DeviceInstanceId, MAX_INSTANCE_ID, DeviceInstanceId, _TRUNCATE); + wcsncpy_s(Ctx->DeviceInstanceId, MAX_DEVICE_ID_LEN, DeviceInstanceId, _TRUNCATE); SetEvent(Ctx->Triggered); } |