Commit 2ea9618a authored by Robert Schmidt's avatar Robert Schmidt

Limit function name string length for logging output

parent 8aaede90
...@@ -542,11 +542,11 @@ static inline int log_header(log_component_t *c, ...@@ -542,11 +542,11 @@ static inline int log_header(log_component_t *c,
char l[32]; char l[32];
if (flag & FLAG_FILE_LINE && flag & FLAG_FUNCT ) if (flag & FLAG_FILE_LINE && flag & FLAG_FUNCT )
snprintf(l, sizeof l, "(%s:%d) ", func, line); snprintf(l, sizeof l, "(%.23s:%d) ", func, line);
else if (flag & FLAG_FILE_LINE) else if (flag & FLAG_FILE_LINE)
snprintf(l, sizeof l, "(%d) ", line); snprintf(l, sizeof l, "(%d) ", line);
else if (flag & FLAG_FUNCT) else if (flag & FLAG_FUNCT)
snprintf(l, sizeof l, "(%s) ", func); snprintf(l, sizeof l, "(%.28s) ", func);
else else
l[0] = 0; l[0] = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment