diff --git a/0001-Do-not-check-the-stored-DIFAT-sector-count.patch b/0001-Do-not-check-the-stored-DIFAT-sector-count.patch index 7e68b46..bbb6745 100644 --- a/0001-Do-not-check-the-stored-DIFAT-sector-count.patch +++ b/0001-Do-not-check-the-stored-DIFAT-sector-count.patch @@ -1,21 +1,25 @@ -From 50d89530eee57afb890e2e65aac8a5b0f93a74a3 Mon Sep 17 00:00:00 2001 +From 1b0c2d842ce92ea350a681a8f3ed6733e7094318 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 15 Aug 2012 14:06:06 -0400 -Subject: [PATCH] Do not check the stored DIFAT sector count. +Subject: [PATCH 1/3] Do not check the stored DIFAT sector count. Refer to this thread for details. http://lists.freedesktop.org/archives/libreoffice/2012-August/036852.html Change-Id: Id2115732a1e1bcd78c13445f5aaefe1ec7cfa0c2 +(cherry picked from commit 50d89530eee57afb890e2e65aac8a5b0f93a74a3) + +Signed-off-by: Ivan Timofeev +(cherry picked from commit 1053dada25491ba5609ae47bef8766e379e96fd8) --- sot/source/sdstor/stgelem.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx -index 5fb3a09..dfcc28a 100644 +index 1af72f9..90f1e2d 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx -@@ -194,7 +194,7 @@ sal_Bool StgHeader::Check() +@@ -203,7 +203,7 @@ sal_Bool StgHeader::Check() && nTOCstrm >= 0 && nThreshold > 0 && ( nDataFAT == -2 || ( nDataFAT >= 0 && nDataFATSize > 0 ) ) @@ -25,5 +29,5 @@ index 5fb3a09..dfcc28a 100644 } -- -1.7.11.4 +1.7.11.7 diff --git a/0002-Resolves-fdo-53909-STG_FREE-sector-locations-rejecte.patch b/0002-Resolves-fdo-53909-STG_FREE-sector-locations-rejecte.patch new file mode 100644 index 0000000..9656b5d --- /dev/null +++ b/0002-Resolves-fdo-53909-STG_FREE-sector-locations-rejecte.patch @@ -0,0 +1,61 @@ +From 4bb506fbf88bd608cba534d4a431529d7cb05061 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 22 Nov 2012 22:29:11 +0000 +Subject: [PATCH 2/3] Resolves: fdo#53909 STG_FREE sector locations rejected + +(cherry picked from commit ef9f9b750eac2966634c385a2021716c4de0e4cd) + +Conflicts: + sot/source/sdstor/stgelem.cxx + +Change-Id: I6f71c7e3cfeeba8a76096d5be68838b8d401c580 +Reviewed-on: https://gerrit.libreoffice.org/1150 +Reviewed-by: Stephan Bergmann +Tested-by: Stephan Bergmann +(cherry picked from commit d99c7edff18fb84312928589d3639d0005c23bbe) +--- + sot/source/sdstor/stgelem.cxx | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx +index 90f1e2d..e0d738a 100644 +--- a/sot/source/sdstor/stgelem.cxx ++++ b/sot/source/sdstor/stgelem.cxx +@@ -191,6 +191,14 @@ static bool lcl_wontoverflow(short shift) + return shift >= 0 && shift < (short)sizeof(short) * 8 - 1; + } + ++static bool isKnownSpecial(sal_Int32 nLocation) ++{ ++ return (nLocation == STG_FREE || ++ nLocation == STG_EOF || ++ nLocation == STG_FAT || ++ nLocation == STG_MASTER); ++} ++ + // Perform thorough checks also on unknown variables + sal_Bool StgHeader::Check() + { +@@ -202,8 +210,8 @@ sal_Bool StgHeader::Check() + && nFATSize > 0 + && nTOCstrm >= 0 + && nThreshold > 0 +- && ( nDataFAT == -2 || ( nDataFAT >= 0 && nDataFATSize > 0 ) ) +- && ( nMasterChain == -2 || nMasterChain >=0 ) ++ && ( isKnownSpecial(nDataFAT) || ( nDataFAT >= 0 && nDataFATSize > 0 ) ) ++ && ( isKnownSpecial(nMasterChain) || nMasterChain >=0 ) + && nMaster >= 0; + } + +@@ -404,7 +412,7 @@ sal_Bool StgEntry::Load( const void* pFrom, sal_uInt32 nBufSize ) + if (n > nMaxLegalStr) + return sal_False; + +- if ((nSize < 0 && cType != STG_STORAGE) || (nPage1 < 0 && nPage1 != -2)) ++ if ((nSize < 0 && cType != STG_STORAGE) || (nPage1 < 0 && !isKnownSpecial(nPage1))) + { + // the size makes no sense for the substorage + // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb +-- +1.7.11.7 + diff --git a/0003-Resolves-fdo-57532-restrict-page-sanity-check-to-non.patch b/0003-Resolves-fdo-57532-restrict-page-sanity-check-to-non.patch new file mode 100644 index 0000000..fb3699b --- /dev/null +++ b/0003-Resolves-fdo-57532-restrict-page-sanity-check-to-non.patch @@ -0,0 +1,116 @@ +From 55a9d02afec39a4c94712cf5f17daddce52cdf51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 5 Dec 2012 13:16:32 +0000 +Subject: [PATCH 3/3] Resolves: fdo#57532 restrict page sanity check to + non-storage chunks + +Change-Id: I47c24131e95b9a8a691dbff4710869ba91df8306 +(cherry picked from commit 4a1044229afd6b52ca10e5c55f1957b153a8c6ea) +Reviewed-on: https://gerrit.libreoffice.org/1245 +Reviewed-by: Michael Meeks +Tested-by: Michael Meeks +(cherry picked from commit 05a116786648c0a045956b626c3f9f163f0a268e) +--- + sot/qa/cppunit/data/pass/fdo57532-1.compound | Bin 0 -> 25088 bytes + sot/source/sdstor/stgelem.cxx | 2 +- + 2 files changed, 1 insertion(+), 1 deletion(-) + create mode 100644 sot/qa/cppunit/data/pass/fdo57532-1.compound + +diff --git a/sot/qa/cppunit/data/pass/fdo57532-1.compound b/sot/qa/cppunit/data/pass/fdo57532-1.compound +new file mode 100644 +index 0000000000000000000000000000000000000000..70068fe10c893813cdd0fa95a83a7326f69c9c32 +GIT binary patch +literal 25088 +zcmeHPdu&@*8UOCJojPsZrb&~&x6>}`Gxg#=lQOzEuQpwqge0XP3d2cm8W+d*t{uAY +zQh)*#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< 0 && cType != STG_STORAGE) || (nPage1 < 0 && !isKnownSpecial(nPage1))) ++ if ((cType != STG_STORAGE) && ((nSize < 0) || (nPage1 < 0 && !isKnownSpecial(nPage1)))) + { + // the size makes no sense for the substorage + // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb +-- +1.7.11.7 + diff --git a/libreoffice.spec b/libreoffice.spec index f7d81cf..150d3ea 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -172,6 +172,8 @@ Patch54: 0001-Resolves-fdo-56009-fdo-54695-Calculate-positions-of-.patch Patch55: 0001-Enable-NPP_Initialize-Shutdown-again.patch Patch56: 0001-Do-not-move-nCurUndoAction-0.patch Patch57: 0001-fdo-48442-fix-default-hori-vert-frame-anchor-during-.patch +Patch58: 0002-Resolves-fdo-53909-STG_FREE-sector-locations-rejecte.patch +Patch59: 0003-Resolves-fdo-57532-restrict-page-sanity-check-to-non.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -1059,6 +1061,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch55 -p1 -b .Enable-NPP_Initialize-Shutdown-again.patch %patch56 -p1 -b .Do-not-move-nCurUndoAction-0.patch %patch57 -p1 -b .fdo-48442-fix-default-hori-vert-frame-anchor-during-.patch +%patch58 -p1 -b .Resolves-fdo-53909-STG_FREE-sector-locations-rejecte.patch +%patch59 -p1 -b .Resolves-fdo-57532-restrict-page-sanity-check-to-non.patch # TODO: check this # these are horribly incomplete--empty translations and copied english @@ -2347,6 +2351,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %changelog * Fri Dec 21 2012 David Tardon - 1:3.5.7.2-8-UNBUILT - Resolves: rhbz#810739 Incorrect displaying attached rtf document +- Resolves: rhbz#876606 regressions in MSO binary import filters * Thu Dec 06 2012 Stephan Bergmann - 1:3.5.7.2-7 - Resolves: rendering documents in browser plug-in