Skip to content
Snippets Groups Projects
Commit 5ffc7c66 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

logging: line buffer overfill check

parent 808d007a
No related branches found
No related tags found
No related merge requests found
......@@ -334,7 +334,7 @@ static int log_msg_add(char **write, size_t *capacity, const char *fmt, ...)
int written = vsnprintf(*write, *capacity, fmt, args);
va_end(args);
if (written < 0) {
if (written < 0 || written >= *capacity) {
return KNOT_ESPACE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment