[PATCH libreoffice-3-6] Resolves: fdo#47209 and rhbz#927223 syntax highlighter crash
Caolán McNamara (via_Code_Review)
gerrit at gerrit.libreoffice.org
Tue Apr 16 05:51:34 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3415
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/15/3415/1
Resolves: fdo#47209 and rhbz#927223 syntax highlighter crash
when trying to parse empty lines looking for the matching
bracket
Change-Id: I3961a3d0e804d136de286e21934c6ba5ab0496cf
(cherry picked from commit 02917cb57e2c2e9fcab2db8f72960023f3e4edaf)
---
M svtools/source/edit/editsyntaxhighlighter.cxx
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 20749db..28cbcd5 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -98,6 +98,10 @@
continue;
String aLine( GetTextEngine()->GetText( aPara ) );
+
+ if (aLine.Len() == 0)
+ continue;
+
for (sal_uInt16 i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (sal_uInt16)(aLine.Len()-1); i>0; --i)
{
if (aLine.GetChar(i)==aChar)
--
To view, visit https://gerrit.libreoffice.org/3415
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3961a3d0e804d136de286e21934c6ba5ab0496cf
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Caolán McNamara <caolanm at redhat.com>
More information about the LibreOffice
mailing list