about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui-ssdiff.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui-ssdiff.c b/ui-ssdiff.c
index b6dc5b0..af8bc9e 100644
--- a/ui-ssdiff.c
+++ b/ui-ssdiff.c
@@ -117,7 +117,7 @@ static char *replace_tabs(char *line)
 	int n_tabs = 0;
 	int i;
 	char *result;
-	int result_len;
+	size_t result_len;
 
 	if (linelen == 0) {
 		result = xmalloc(1);
@@ -136,10 +136,12 @@ static char *replace_tabs(char *line)
 	for (;;) {
 		cur_buf = strchr(prev_buf, '\t');
 		if (!cur_buf) {
-			strncat(result, prev_buf, result_len);
+			linelen = strlen(result);
+			strlcpy(&result[linelen], prev_buf, result_len - linelen + 1);
 			break;
 		} else {
-			strncat(result, prev_buf, cur_buf - prev_buf);
+			linelen = strlen(result);
+			strlcpy(&result[linelen], prev_buf, cur_buf - prev_buf + 1);
 			linelen = strlen(result);
 			memset(&result[linelen], ' ', 8 - (linelen % 8));
 			result[linelen + 8 - (linelen % 8)] = '\0';
/www/photo.causal.agency/2024-06-12/lens?id=a803eccd84cde8678908eb546eb9554e9993dbd4&follow=1'>Add photo descriptions from June 12June McEnroe 2024-06-10Add first roll of film from June 8June McEnroe 2024-06-10Cope with not having an EXIF infoJune McEnroe 2024-06-10Resize using target pixel counts for consistencyJune McEnroe This will resize film scans to about the same size as for the digital photos. 2024-06-10Add The Girl Who Was Convinced...June McEnroe Not much there. The illustrations are very nice though. 2024-06-09Add photos from May 31June McEnroe 2024-06-09Use monospace on photo pagesJune McEnroe 2024-06-09Put lens and (future) film at the tops of photo pagesJune McEnroe 2024-05-22Remove use of sysexits.hJune McEnroe 2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe 2024-05-21Fix = precedence in whenJune McEnroe