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

Martin Bednar <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/kdev
                   |                            |elop/kdev-python/-/commit/9
                   |                            |20ea1dbd8125b2bd0f6425300e7
                   |                            |5fc46d99030f
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Martin Bednar <[email protected]> ---
Git commit 920ea1dbd8125b2bd0f6425300e75fc46d99030f by Martin Bednár.
Committed on 11/09/2026 at 13:36.
Pushed by brauch into branch 'master'.

Fix UB in popExpression()

QString::constEnd() -1 is UB if the string is empty.

The for cycle walks the string backward from constEnd() -1 (UB) , stopping
at constEnd() which can never be reached by decrementing the iterator.

Use reverse iterators instead: we get implicit check for empty string,
and prevent endless looping.

M  +1    -1    codecompletion/helpers.cpp

https://invent.kde.org/kdevelop/kdev-python/-/commit/920ea1dbd8125b2bd0f6425300e75fc46d99030f

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

Reply via email to