diff --git a/0001-Resolves-fdo-47209-and-rhbz-927223-syntax-highlighte.patch b/0001-Resolves-fdo-47209-and-rhbz-927223-syntax-highlighte.patch new file mode 100644 index 0000000..7b360e5 --- /dev/null +++ b/0001-Resolves-fdo-47209-and-rhbz-927223-syntax-highlighte.patch @@ -0,0 +1,31 @@ +From 02917cb57e2c2e9fcab2db8f72960023f3e4edaf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 16 Apr 2013 13:40:04 +0100 +Subject: [PATCH] Resolves: fdo#47209 and rhbz#927223 syntax highlighter crash + +when trying to parse empty lines looking for the matching +bracket + +Change-Id: I3961a3d0e804d136de286e21934c6ba5ab0496cf +--- + svtools/source/edit/editsyntaxhighlighter.cxx | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx +index 62a7a25..3f1cd8d 100644 +--- a/svtools/source/edit/editsyntaxhighlighter.cxx ++++ b/svtools/source/edit/editsyntaxhighlighter.cxx +@@ -89,6 +89,10 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 aKey) + 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) +-- +1.8.1.2 + diff --git a/libreoffice.spec b/libreoffice.spec index 32b9d73..5365cb8 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -258,6 +258,7 @@ Patch36: 0001-rhbz-876742-speed-up-table-manipulation-in-Impress.patch Patch37: 0001-fdo-62617-display-groups-on-multiple-layers-correctl.patch Patch38: 0001-Resolves-rhbz-949238-div-by-zero-on-pagedown-in-0-wi.patch Patch39: 0001-valgrind-uninitialized-value.patch +Patch40: 0001-Resolves-fdo-47209-and-rhbz-927223-syntax-highlighte.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -1009,6 +1010,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch37 -p1 -b .fdo-62617-display-groups-on-multiple-layers-correctl.patch %patch38 -p1 -b .rhbz-949238-div-by-zero-on-pagedown-in-0-wi.patch %patch39 -p1 -b .valgrind-uninitialized-value.patch +%patch40 -p1 -b .fdo-47209-and-rhbz-927223-syntax-highlighte.patch # TODO: check this # these are horribly incomplete--empty translations and copied english @@ -2280,6 +2282,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %changelog * Thu Apr 16 2013 Caolán McNamara - 1:3.6.6.2-3 - Related: rhbz#924515 uninitialized variable in editengine +- Resolves: rhbz#927223 syntax highlighting crash * Mon Apr 08 2013 Caolán McNamara - 1:3.6.6.2-2 - Resolves: rhbz#949238 div by zero on pagedown in 0 width task pane