diff --git a/WHATS_NEW b/WHATS_NEW index 75be2e7a6..39b800085 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,4 +1,5 @@ Version 2.02.28 - + In _line_append, use "sizeof buf - 1" rather than equivalent "4095" Introduce is_same_inode macro, now including a comparison of st_dev. Don't leak a file descriptor in _lock_file(), when flock fails. Add SUN's LDOM virtual block device to filters diff --git a/lib/config/config.c b/lib/config/config.c index b5f003810..bbfe7dfb1 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -367,8 +367,8 @@ static int _line_append(struct output_line *outline, const char *fmt, ...) int n; va_start(ap, fmt); - n = vsnprintf(&buf[0], 4095, fmt, ap); - if (n < 0 || n > 4095) { + n = vsnprintf(&buf[0], sizeof buf - 1, fmt, ap); + if (n < 0 || n > sizeof buf - 1) { log_error("vsnprintf failed for config line"); return 0; }