drm: apple: use strscpy() in place of strlcpy()
authorkettenis <kettenis@openbsd.org>
Tue, 23 Jan 2024 14:27:26 +0000 (14:27 +0000)
committerkettenis <kettenis@openbsd.org>
Tue, 23 Jan 2024 14:27:26 +0000 (14:27 +0000)
From Arnd Bergmann
2501a971dbec631932aba9aba55b7b61b7c3c390 in jannau's bits/200-dcp

sys/dev/pci/drm/apple/afk.c

index d844eec..de483ac 100644 (file)
@@ -237,7 +237,7 @@ static void afk_recv_handle_init(struct apple_dcp_afkep *ep, u32 channel,
                return;
        }
 
-       strlcpy(name, payload, sizeof(name));
+       strscpy(name, payload, sizeof(name));
 
        /*
         * in DCP firmware 13.2 DCP reports interface-name as name which starts