Skip to content

Commit

Permalink
Fix issue that the slice button is still disabled after a tick is del…
Browse files Browse the repository at this point in the history
…eted (#2308)

Fix an UAF which causes the slice button being disabled after a tick is deleted
  • Loading branch information
Noisyfox authored Oct 3, 2023
1 parent 85e24e6 commit 8e70081
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/slic3r/GUI/IMSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ void IMSlider::add_code_as_tick(Type type, int selected_extruder)
}

void IMSlider::delete_tick(const TickCode& tick) {
Type t = tick.type; // Avoid Use-After-Free issue, which resets the tick.type to 0
m_ticks.ticks.erase(tick);
post_ticks_changed_event(tick.type);
post_ticks_changed_event(t);
}

bool IMSlider::check_ticks_changed_event(Type type)
Expand Down

0 comments on commit 8e70081

Please sign in to comment.