about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui-ssdiff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui-ssdiff.c b/ui-ssdiff.c
index 68c2044..a3dd059 100644
--- a/ui-ssdiff.c
+++ b/ui-ssdiff.c
@@ -103,8 +103,7 @@ static int line_from_hunk(char *line, char type)
 		return 0;
 	len = buf2 - buf1;
 	buf2 = xmalloc(len + 1);
-	strncpy(buf2, buf1, len);
-	buf2[len] = '\0';
+	strlcpy(buf2, buf1, len + 1);
 	res = atoi(buf2);
 	free(buf2);
 	return res;
span title='2020-02-11 03:48:50 -0500'>2020-02-11Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe