diff --git a/plugins/sudoers/iolog_path.c b/plugins/sudoers/iolog_path.c index 745f8aadb..0f1044f20 100644 --- a/plugins/sudoers/iolog_path.c +++ b/plugins/sudoers/iolog_path.c @@ -250,6 +250,7 @@ expand_iolog_path(const char *prefix, const char *dir, const char *file, } #endif /* We only calls strftime() on the current part of the buffer. */ + tmpbuf[sizeof(tmpbuf) - 1] = '\0'; len = strftime(tmpbuf, sizeof(tmpbuf), dst0, timeptr); #ifdef HAVE_SETLOCALE