summaryrefslogtreecommitdiff
path: root/src/ical.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ical.c')
-rw-r--r--src/ical.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ical.c b/src/ical.c
index 4360a76..ac158fc 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -447,8 +447,7 @@ ical_readline (FILE *fdi, char *buf, char *lstore, unsigned *ln)
*eol = '\0';
if (*lstore != SPACE && *lstore != TAB)
break;
- strncat (buf, lstore + 1, BUFSIZ);
- buf[BUFSIZ - 1] = '\0';
+ strncat (buf, lstore + 1, BUFSIZ - strlen (buf) - 1);
(*ln)++;
}