Fix one byte too large buffer copy

Sun, 07 Jul 2019 13:04:16 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 07 Jul 2019 13:04:16 +0200
changeset 599
b44eb07cab48
parent 598
363dc36d2450
child 600
af2383e3f110

Fix one byte too large buffer copy

thermferm/server.c file | annotate | diff | comparison | revisions
--- a/thermferm/server.c	Sun Jul 07 12:58:06 2019 +0200
+++ b/thermferm/server.c	Sun Jul 07 13:04:16 2019 +0200
@@ -205,7 +205,7 @@
 
     *tmp = (ls_list *)malloc(sizeof(ls_list));
     (*tmp)->next = NULL;
-    strncpy((*tmp)->d_name, name, 256);
+    strncpy((*tmp)->d_name, name, 255);
     (*tmp)->mode = mode;
     (*tmp)->size = size;
     (*tmp)->mtime = mtime;

mercurial