Skip to content

Commit 77d102f

Browse files
committed
[logfile_sub_source] use-after-free error
1 parent a20955d commit 77d102f

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/logfile_sub_source.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -654,14 +654,8 @@ logfile_sub_source::text_attrs_for_line(textview_curses& lv,
654654
}
655655

656656
if (this->lss_token_line->get_msg_level() == log_level_t::LEVEL_INVALID) {
657-
for (auto& token_attr : this->lss_token_al.al_attrs) {
658-
if (token_attr.sa_type != &SA_INVALID) {
659-
continue;
660-
}
661-
662-
this->lss_token_al.al_attrs.emplace_back(
663-
token_attr.sa_range, VC_ROLE.value(role_t::VCR_INVALID_MSG));
664-
}
657+
this->lss_token_al.al_attrs.emplace_back(
658+
line_range{0, -1}, VC_ROLE.value(role_t::VCR_INVALID_MSG));
665659
}
666660

667661
for (const auto& line_value : line_values.lvv_values) {

0 commit comments

Comments
 (0)