[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: [Bug 129263] Crash related to auto indentation
From: Johannes Sixt <johannes.sixt () telecom ! at>
Date: 2006-06-21 21:07:50
Message-ID: 20060621210750.24870.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=129263
johannes.sixt telecom at changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
------- Additional Comments From johannes.sixt telecom at 2006-06-21 23:07 -------
SVN commit 553727 by jsixt:
Fix an off-by-1 (32bit) resp. off-by-2^32-1 (64bit) access by catching -1
before it is passed to stringAtPos().
BUG: 129263
M +3 -2 kateautoindent.cpp
--- branches/KDE/3.5/kdelibs/kate/part/kateautoindent.cpp #553726:553727
@ -891,9 +891,10 @
{
cur.setCol(cur.col() + 4);
needsBalanced = false;
- if (textLine->stringAtPos(textLine->nextNonSpaceChar(cur.col()), "if"))
+ int next = textLine->nextNonSpaceChar(cur.col());
+ if (next >= 0 && textLine->stringAtPos(next, "if"))
{
- cur.setCol(textLine->nextNonSpaceChar(cur.col()) + 2);
+ cur.setCol(next + 2);
needsBalanced = true;
}
}
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic