diff --git a/0001-Resolves-rhbz-738255-avoid-crash-on-NULL-pointer.patch b/0001-Resolves-rhbz-738255-avoid-crash-on-NULL-pointer.patch new file mode 100644 index 0000000..f6cdc69 --- /dev/null +++ b/0001-Resolves-rhbz-738255-avoid-crash-on-NULL-pointer.patch @@ -0,0 +1,39 @@ +From 76cf006837fdb687ce0a34ac673f3b8531b19700 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 15 Sep 2011 12:32:51 +0100 +Subject: [PATCH] Resolves: rhbz#738255 avoid crash on NULL pointer + +--- + sc/source/ui/app/inputhdl.cxx | 15 +++++++++------ + 1 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx +index 1524397..c30a8fd 100644 +--- a/sc/source/ui/app/inputhdl.cxx ++++ b/sc/source/ui/app/inputhdl.cxx +@@ -2469,13 +2469,16 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) + ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocument(); + // #i67990# don't use pLastPattern in EnterHandler + const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab() ); +- SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); +- // without conditional format, as in ScColumn::SetString +- sal_uInt32 nFormat = pPattern->GetNumberFormat( pFormatter ); +- double nVal; +- if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) ) ++ if (pPattern) + { +- bSpellErrors = false; // ignore the spelling errors ++ SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); ++ // without conditional format, as in ScColumn::SetString ++ sal_uInt32 nFormat = pPattern->GetNumberFormat( pFormatter ); ++ double nVal; ++ if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) ) ++ { ++ bSpellErrors = false; // ignore the spelling errors ++ } + } + } + } +-- +1.7.6 + diff --git a/libreoffice.spec b/libreoffice.spec index f86f065..92206f6 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -27,7 +27,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: 3.4.3.2 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain Group: Applications/Productivity URL: http://www.documentfoundation.org/develop @@ -122,6 +122,7 @@ Patch27: 0001-Related-rhbz-730225-avoid-segv-in-ld-this-was-set-to.patch Patch28: gdb-pretty-printers.patch Patch29: 0001-Related-fdo-37195-migrationoo3-not-registered.patch Patch30: 0001-Resolves-rhbz-735182-libreoffice-doesn-t-build-with-.patch +Patch31: 0001-Resolves-rhbz-738255-avoid-crash-on-NULL-pointer.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -794,6 +795,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch28 -p1 %patch29 -p1 -b .fdo37195-migrationoo3-not-registered.patch %patch30 -p1 -b .rhbz735182-libreoffice-doesn-t-build-with-.patch +%patch31 -p1 -b .rhbz738255-avoid-crash-on-NULL-pointer.patch # these are horribly incomplete--empty translations and copied english # strings with spattering of translated strings @@ -2092,6 +2094,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{basisinstdir}/program/kde-open-url %changelog +* Thu Sep 15 2011 Caolán McNamara - 3.4.3.2-9 +- Resolves: rhbz#738255 avoid crash on sc inputhdl + * Tue Sep 13 2011 Caolán McNamara - 3.4.3.2-8 - Resolves: rhbz#274631 remove NoDisplay from -math.desktop