From 470bdf3e26e433032fe7986f379cad797cdd94cd Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 14 Oct 2021 06:37:50 +0000 Subject: api: use proper instance id bounds Signed-off-by: Jason A. Donenfeld --- api/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/adapter.c') 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); } -- cgit v1.2.3-59-g8ed1b