aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--trace-util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/trace-util.c b/trace-util.c
index 6854977..4a97ff0 100644
--- a/trace-util.c
+++ b/trace-util.c
@@ -169,6 +169,10 @@ void parse_ftrace_printk(char *file, unsigned int size __unused)
169 line = strtok_r(file, "\n", &next); 169 line = strtok_r(file, "\n", &next);
170 while (line) { 170 while (line) {
171 addr_str = strtok_r(line, ":", &fmt); 171 addr_str = strtok_r(line, ":", &fmt);
172 if (!addr_str) {
173 warning("printk format with empty entry");
174 break;
175 }
172 addr = strtoull(addr_str, NULL, 16); 176 addr = strtoull(addr_str, NULL, 16);
173 /* fmt still has a space, skip it */ 177 /* fmt still has a space, skip it */
174 printk = strdup(fmt+1); 178 printk = strdup(fmt+1);