summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4e4b30e)
A return value of `len` or more means that the output was truncated.
Signed-off-by: Peter Prohaska <pitrp@web.de>
Signed-off-by: Christian Hesse <mail@eworm.de>
va_start(args, format);
len = vsnprintf(buf[bufidx], sizeof(buf[bufidx]), format, args);
va_end(args);
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);
}
fprintf(stderr, "[html.c] string truncated: %s\n", format);
exit(1);
}