From: Peter Prohaska <pi...@web.de>

A return value of `len` or more means that the output was truncated.

Signed-off-by: Peter Prohaska <pi...@web.de>
Signed-off-by: Christian Hesse <m...@eworm.de>
---
 html.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html.c b/html.c
index 7f81965..0bac34b 100644
--- a/html.c
+++ b/html.c
@@ -59,7 +59,7 @@ char *fmt(const char *format, ...)
        va_start(args, format);
        len = vsnprintf(buf[bufidx], sizeof(buf[bufidx]), format, args);
        va_end(args);
-       if (len > sizeof(buf[bufidx])) {
+       if (len >= sizeof(buf[bufidx])) {
                fprintf(stderr, "[html.c] string truncated: %s\n", format);
                exit(1);
        }

Reply via email to