summaryrefslogtreecommitdiff
path: root/src/note.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/note.c')
-rw-r--r--src/note.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/note.c b/src/note.c
index 2686dd7..1891a5f 100644
--- a/src/note.c
+++ b/src/note.c
@@ -76,10 +76,10 @@ edit_note (char **note, char *editor)
FILE *fp;
strncpy (tmppath, get_tempdir (), BUFSIZ);
- strncat (tmppath, "/calcurse-note.", BUFSIZ);
+ strncat (tmppath, "/calcurse-note.", BUFSIZ - strlen (tmppath) - 1);
if ((tmpext = new_tempfile (tmppath, TMPEXTSIZ)) == NULL)
return;
- strncat (tmppath, tmpext, BUFSIZ);
+ strncat (tmppath, tmpext, BUFSIZ - strlen (tmppath) - 1);
mem_free (tmpext);
if (*note != NULL)