diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index 9bdb201..e965c1a 100644 --- a/src/config.c +++ b/src/config.c @@ -562,10 +562,10 @@ config_save (void) int i; strncpy (tmppath, get_tempdir (), BUFSIZ); - strncat (tmppath, "/" CONF_PATH_NAME ".", BUFSIZ); + strncat (tmppath, "/" CONF_PATH_NAME ".", BUFSIZ - strlen (tmppath) - 1); if ((tmpext = new_tempfile (tmppath, TMPEXTSIZ)) == NULL) return 0; - strncat (tmppath, tmpext, BUFSIZ); + strncat (tmppath, tmpext, BUFSIZ - strlen (tmppath) - 1); mem_free (tmpext); status.fp = fopen (tmppath, "w"); |