KDAB / hotspot

The Linux perf GUI for performance analysis.
4.16k stars 257 forks source link

fix out of range access #530

Closed lievenhey closed 1 year ago

lievenhey commented 1 year ago

start was set to current + 1 which will cause undefined behavior if current is the last element this patch adds a check for this and wraps around in that case

fixes: #526

lievenhey commented 1 year ago

I have to check the output of the appimage build since the warning is only shown there

lievenhey commented 1 year ago

How do I test this? Since gcc 5 std::find_if returns end if begin > end (figured out by playing with godbolt, since this error only happens on old compilers)