Message ID | 20220221154628.525d7513@rorschach.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | c642be90d6b699ace94ddf393a395fe0ee9a1ffc |
Headers | show |
Series | libtraceevent: Account for events with newlines in print fmt | expand |
diff --git a/src/event-parse.c b/src/event-parse.c index 2b346a5..7a84789 100644 --- a/src/event-parse.c +++ b/src/event-parse.c @@ -1248,7 +1248,7 @@ static enum tep_event_type __read_token(char **tok) if (ch == '\\' && last_ch == '\\') last_ch = 0; /* Break out if the file is corrupted and giving non print chars */ - } while ((ch != quote_ch && isprint(ch)) || last_ch == '\\'); + } while ((ch != quote_ch && isprint(ch)) || last_ch == '\\' || ch == '\n'); /* remove the last quote */ i--;