https://bugs.kde.org/show_bug.cgi?id=503740

--- Comment #4 from espaguetti <[email protected]> ---
The application crashes with a segmentation fault when accepting a DVB scan
dialog. The issue occurs in the SqlInterface::sqlFindFreeKey template function
in sqlinterface.h at line 90:

sqlKey = SqlKey(std::prev(container.constEnd(), -1).key().sqlKey + 1);

The crash happens because:
1. std::prev() is being used incorrectly with a negative offset (-1), which
attempts to move forward from the end iterator
2. The code doesn't check if the container is empty before attempting to access
elements

Stack trace shows the crash occurs during DvbChannelModel::cloneFrom() which
calls DvbChannelModel::addChannel(), which then attempts to find a free key.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to