summaryrefslogtreecommitdiff
path: root/editors/openoffice-devel/files
diff options
context:
space:
mode:
authorDon Lewis <truckman@FreeBSD.org>2017-10-26 18:38:56 +0000
committerDon Lewis <truckman@FreeBSD.org>2017-10-26 18:38:56 +0000
commit02d7e03e423d82ac914efd6326f80f0712777d1e (patch)
tree3b6e6628c89b6a89ec5918ebb38032ecb4349fd2 /editors/openoffice-devel/files
parentUpdate devel/nimble to 0.8.8 (diff)
Add a security patch taken from Apache OpenOffice 4.1.4.
Add a LICENSE entry for MPL10. Code containing both MPL10 and MPL11 licenses is bundled. Add CONFLICTS_INSTALL. Move --with-ant-home and -with-jdk-home to Makefile from Makefile.knobs. MFH: 2017Q4 Security: 27229c67-b8ff-11e7-9f79-ac9e174be3af
Notes
Notes: svn path=/head/; revision=452937
Diffstat (limited to 'editors/openoffice-devel/files')
-rw-r--r--editors/openoffice-devel/files/Makefile.knobs1
-rw-r--r--editors/openoffice-devel/files/patch-security215
2 files changed, 215 insertions, 1 deletions
diff --git a/editors/openoffice-devel/files/Makefile.knobs b/editors/openoffice-devel/files/Makefile.knobs
index a15493192192..b031c57db3d4 100644
--- a/editors/openoffice-devel/files/Makefile.knobs
+++ b/editors/openoffice-devel/files/Makefile.knobs
@@ -2,7 +2,6 @@
# Whom: Maho Nakata <maho@FreeBSD.org>
# $FreeBSD$
-CONFIGURE_ARGS+= --with-jdk-home="${JAVA_HOME}" --with-ant-home="${LOCALBASE}/share/java/apache-ant"
CONFIGURE_ARGS+= --with-lang=${LOCALIZED_LANG}
pre-fetch:
diff --git a/editors/openoffice-devel/files/patch-security b/editors/openoffice-devel/files/patch-security
new file mode 100644
index 000000000000..d8e033e173d9
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-security
@@ -0,0 +1,215 @@
+Index: comphelper/source/container/embeddedobjectcontainer.cxx
+===================================================================
+--- comphelper/source/container/embeddedobjectcontainer.cxx (revision 1813062)
++++ comphelper/source/container/embeddedobjectcontainer.cxx (working copy)
+@@ -127,7 +127,7 @@
+ pImpl = new EmbedImpl;
+ pImpl->mxStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
+ pImpl->mbOwnsStorage = true;
+- pImpl->mbUserAllowsLinkUpdate = false;
++ pImpl->mbUserAllowsLinkUpdate = true;
+ pImpl->mpTempObjectContainer = 0;
+ }
+
+@@ -136,7 +136,7 @@
+ pImpl = new EmbedImpl;
+ pImpl->mxStorage = rStor;
+ pImpl->mbOwnsStorage = false;
+- pImpl->mbUserAllowsLinkUpdate = false;
++ pImpl->mbUserAllowsLinkUpdate = true;
+ pImpl->mpTempObjectContainer = 0;
+ }
+
+@@ -145,7 +145,7 @@
+ pImpl = new EmbedImpl;
+ pImpl->mxStorage = rStor;
+ pImpl->mbOwnsStorage = false;
+- pImpl->mbUserAllowsLinkUpdate = false;
++ pImpl->mbUserAllowsLinkUpdate = true;
+ pImpl->mpTempObjectContainer = 0;
+ pImpl->m_xModel = xModel;
+ }
+Index: sc/source/core/data/documen2.cxx
+===================================================================
+--- sc/source/core/data/documen2.cxx (revision 1813062)
++++ sc/source/core/data/documen2.cxx (working copy)
+@@ -229,7 +229,10 @@
+ if ( eMode == SCDOCMODE_DOCUMENT )
+ {
+ if ( pDocShell )
+- pLinkManager = new sfx2::LinkManager( pDocShell );
++ {
++ pLinkManager = new sfx2::LinkManager(pDocShell);
++ pLinkManager->SetAutoAskUpdateAllLinks();
++ }
+
+ xPoolHelper = new ScPoolHelper( this );
+
+@@ -269,6 +272,7 @@
+ if ( bAutoCalc && !pLinkManager && pShell)
+ {
+ pLinkManager = new sfx2::LinkManager( pShell );
++ pLinkManager->SetAutoAskUpdateAllLinks();
+ }
+ return pLinkManager;
+ }
+Index: sfx2/inc/sfx2/linkmgr.hxx
+===================================================================
+--- sfx2/inc/sfx2/linkmgr.hxx (revision 1813062)
++++ sfx2/inc/sfx2/linkmgr.hxx (working copy)
+@@ -54,6 +54,13 @@
+ SvLinkSources aServerTbl;
+
+ SfxObjectShell *pPersist; // LinkMgr has to be deallocated before SfxObjectShell
++
++ sal_Bool mAutoAskUpdateAllLinks;
++ sal_Bool mUpdateAsked;
++ sal_Bool mAllowUpdate;
++
++ sal_Bool GetUserAllowsLinkUpdate(Window *pParent);
++ void SetUserAllowsLinkUpdate(SvBaseLink *pLink, sal_Bool allows);
+ protected:
+ sal_Bool InsertLink( SvBaseLink* pLink, sal_uInt16 nObjType, sal_uInt16 nUpdateType,
+ const String* pName = 0 );
+@@ -104,6 +111,10 @@
+
+ SvLinkSourceRef CreateObj( SvBaseLink* );
+
++
++ // Automatically ask user about update all links, on first insert
++ void SetAutoAskUpdateAllLinks();
++
+ void UpdateAllLinks( sal_Bool bAskUpdate = sal_True,
+ sal_Bool bCallErrHdl = sal_True,
+ sal_Bool bUpdateGrfLinks = sal_False,
+Index: sfx2/source/appl/linkmgr2.cxx
+===================================================================
+--- sfx2/source/appl/linkmgr2.cxx (revision 1813062)
++++ sfx2/source/appl/linkmgr2.cxx (working copy)
+@@ -65,11 +65,12 @@
+ SV_IMPL_PTRARR( SvBaseLinks, SvBaseLinkRefPtr )
+
+ LinkManager::LinkManager(SfxObjectShell* p)
+- : pPersist( p )
++ : pPersist(p),
++ mUpdateAsked(sal_False),
++ mAutoAskUpdateAllLinks(sal_False)
+ {
+ }
+
+-
+ LinkManager::~LinkManager()
+ {
+ SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
+@@ -157,6 +158,12 @@
+ SvBaseLinkRef* pTmp = new SvBaseLinkRef( pLink );
+ pLink->SetLinkManager( this );
+ aLinkTbl.Insert( pTmp, aLinkTbl.Count() );
++ Window *parent = GetPersist()->GetDialogParent();
++ if (mAutoAskUpdateAllLinks)
++ {
++ SetUserAllowsLinkUpdate(pLink, GetUserAllowsLinkUpdate(parent));
++ }
++
+ return sal_True;
+ }
+
+@@ -268,7 +275,36 @@
+ return bRet;
+ }
+
++void LinkManager::SetAutoAskUpdateAllLinks()
++{
++ mAutoAskUpdateAllLinks = sal_True;
++}
+
++sal_Bool LinkManager::GetUserAllowsLinkUpdate(Window *pParentWin)
++{
++ if (!mUpdateAsked)
++ {
++ if (QueryBox(pParentWin, WB_YES_NO | WB_DEF_NO, SfxResId(STR_QUERY_UPDATE_LINKS)).Execute() == RET_YES)
++ mAllowUpdate = sal_True;
++ else
++ mAllowUpdate = sal_False;
++ mUpdateAsked = sal_True;
++ }
++ return mAllowUpdate;
++}
++
++void LinkManager::SetUserAllowsLinkUpdate(SvBaseLink *pLink, sal_Bool allows)
++{
++ SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
++
++ if (pShell)
++ {
++ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pShell->getEmbeddedObjectContainer();
++ rEmbeddedObjectContainer.setUserAllowsLinkUpdate(allows);
++ }
++}
++
++
+ void LinkManager::UpdateAllLinks(
+ sal_Bool bAskUpdate,
+ sal_Bool /*bCallErrHdl*/,
+@@ -312,26 +348,20 @@
+ if( !pLink->IsVisible() ||
+ ( !bUpdateGrfLinks && OBJECT_CLIENT_GRF == pLink->GetObjType() ))
+ continue;
+-
+- if( bAskUpdate )
++
++ sal_Bool allows = sal_True;
++
++ if (bAskUpdate)
+ {
+- int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_NO, SfxResId( STR_QUERY_UPDATE_LINKS ) ).Execute();
+- SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
++ allows = GetUserAllowsLinkUpdate(pParentWin);
++ }
+
+- if(pShell)
+- {
+- comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pShell->getEmbeddedObjectContainer();
+- rEmbeddedObjectContainer.setUserAllowsLinkUpdate(RET_YES == nRet);
+- }
++ SetUserAllowsLinkUpdate(pLink, allows);
++ bAskUpdate = sal_False; // one time is OK
+
+- if (RET_YES != nRet)
+- {
+- return; // nothing should be updated
+- }
+- bAskUpdate = sal_False; // one time is OK
+- }
++ if (allows)
++ pLink->Update();
+
+- pLink->Update();
+ }
+ }
+
+Index: sw/source/filter/ww8/ww8scan.cxx
+===================================================================
+--- sw/source/filter/ww8/ww8scan.cxx (revision 1813062)
++++ sw/source/filter/ww8/ww8scan.cxx (working copy)
+@@ -6467,6 +6467,12 @@
+
+ if( nMax )
+ {
++ // Check size consistency
++ if(nMax > nFFn)
++ {
++ throw std::out_of_range("WW8 beyond end of buffer");
++ }
++
+ // allocate Index Array
+ pFontA = new WW8_FFN[ nMax ];
+ p = pFontA;
+@@ -6585,6 +6591,7 @@
+
+ // Zeiger auf Ursprungsarray einen Font nach hinten setzen
+ pVer8 = (WW8_FFN_Ver8*)( ((sal_uInt8*)pVer8) + pVer8->cbFfnM1 + 1 );
++
+ }
+ }
+ }