From 8da59a621672d4f96525e6876c8d91a28000c2d2 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Sun, 15 Jan 2023 11:40:27 +0000 Subject: [PATCH] safety: Replace strncpy with strlcpy --- eek/eek-keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eek/eek-keyboard.c b/eek/eek-keyboard.c index d2570e28..a41336e7 100644 --- a/eek/eek-keyboard.c +++ b/eek/eek-keyboard.c @@ -75,7 +75,7 @@ struct keymap squeek_key_map_from_str(const char *keymap_str) { if ((void*)ptr == (void*)-1) { g_error("Failed to set up mmap"); } - strncpy(ptr, xkb_keymap_str, keymap_len); + strlcpy(ptr, xkb_keymap_str, keymap_len); munmap(ptr, keymap_len); free(xkb_keymap_str); xkb_keymap_unref(keymap);