From: Marc Haber <mh+debian-packages@zugschlus.de>
Date: Wed, 18 Jun 2025 21:26:18 +0200
Subject: use snprintf instead of strncpy

---
 Source/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/log.c b/Source/log.c
index 7d6a2af..a980bbe 100644
--- a/Source/log.c
+++ b/Source/log.c
@@ -161,7 +161,7 @@ void log_entry(int fd, char *entry) {
   write(fd, entry, (strlen(entry) < 1023) ? strlen(entry) : 1023 );
   write(fd, "\n", 1);
 
-  strncpy(last_message, entry, BUFFER_SIZE);
+  snprintf(last_message, BUFFER_SIZE, "%s", entry);
 
   pthread_mutex_unlock(&log_mutex);
 }
