[Libreoffice-commits] core.git: 3 commits - cui/source filter/source svx/source sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 18 07:40:04 UTC 2019
cui/source/tabpages/page.cxx | 3 ++-
filter/source/graphicfilter/itiff/itiff.cxx | 11 ++++++-----
svx/source/dialog/hdft.cxx | 1 +
svx/source/engine3d/view3d.cxx | 10 ++++++----
sw/source/uibase/sidebar/PageMarginControl.hxx | 3 ++-
5 files changed, 17 insertions(+), 11 deletions(-)
New commits:
commit c21847117a587f1eac99653d05e6ed9278d43f79
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 17 16:13:17 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 18 09:39:09 2019 +0200
Resolves: tdf#126147 relax sanity check and allow truncated tiffs
now the start of the row of data must still exist, but the full
length of the row doesn't have to exist
Change-Id: I5ed8ffef2cab19f040ba789a5d82560ca6847f26
Reviewed-on: https://gerrit.libreoffice.org/75793
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 79a4d85aa66b..970e5958635f 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -570,9 +570,11 @@ bool TIFFReader::ReadMap()
if ( nStrip >= aStripOffsets.size())
return false;
pTIFF->Seek( aStripOffsets[ nStrip ] + ( ny % GetRowsPerStrip() ) * nStripBytesPerRow );
- pTIFF->ReadBytes(getMapData(np), nBytesPerRow);
- if (!pTIFF->good())
- return false;
+ // tdf#126147 allow a short incomplete read
+ auto pDest = getMapData(np);
+ auto nRead = pTIFF->ReadBytes(pDest, nBytesPerRow);
+ if (nRead != nBytesPerRow)
+ memset(pDest + nRead, 0, nBytesPerRow - nRead);
}
if ( !ConvertScanline( ny ) )
return false;
@@ -1512,8 +1514,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
if (bStatus)
{
auto nStart = aStripOffsets[ nStrip ] + ( ny % GetRowsPerStrip() ) * nStripBytesPerRow;
- auto nEnd = nStart + nBytesPerRow;
- if (nEnd > nEndOfFile)
+ if (nStart > nEndOfFile)
bStatus = false;
}
}
commit cefce1a247a4674c5726a31b61571eab16328a0b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 17 20:29:17 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 18 09:38:52 2019 +0200
tdf#126051 sync MINBODY copies to same value
Change-Id: Id41da7b07dcb25e820e5fd20aed595b1170fa204
Reviewed-on: https://gerrit.libreoffice.org/75807
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index a5e7269c224c..dd250a1fe532 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -61,7 +61,8 @@
// static ----------------------------------------------------------------
-static const long MINBODY = 284; // 0,5 cm rounded up in twips
+// #i19922# - tdf#126051 see svx/source/dialog/hdft.cxx and sw/source/uibase/sidebar/PageMarginControl.hxx
+static const long MINBODY = 56; // 1mm in twips rounded
const sal_uInt16 SvxPageDescPage::pRanges[] =
{
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 5f5081c9be39..e4c622ae781a 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -53,6 +53,7 @@
using namespace com::sun::star;
// Word 97 incompatibility (#i19922#)
+// #i19922# - tdf#126051 see cui/source/tabpages/page.cxx and sw/source/uibase/sidebar/PageMarginControl.hxx
static const long MINBODY = 56; // 1mm in twips rounded
// default distance to Header or footer
diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx
index a2b9e0a7deb2..761f5c7dfdec 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.hxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.hxx
@@ -37,7 +37,8 @@
#define SWPAGE_WIDE_VALUE2 2880
#define SWPAGE_WIDE_VALUE3 1800
-static const long MINBODY = 284; //0.5 cm in twips
+// #i19922# - tdf#126051 see cui/source/tabpages/page.cxx and svx/source/dialog/hdft.cxx
+static const long MINBODY = 56; // 1mm in twips rounded
namespace sw { namespace sidebar {
commit f1824e27511709614ea3c03209caee1c22e2ab10
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 17 20:37:27 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 18 09:38:18 2019 +0200
cid#1448253 Use after free
Change-Id: I83f3ef82faafd31f5a1afca9c5ab3f4040c3552b
Reviewed-on: https://gerrit.libreoffice.org/75812
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 42c6605f288a..c18557d71f33 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -1560,11 +1560,13 @@ void E3dView::BreakSingle3DObj(E3dObject* pObj)
else
{
SdrAttrObj* pNewObj = pObj->GetBreakObj().release();
- if(pNewObj)
+ if (pNewObj)
{
- InsertObjectAtView(pNewObj, *GetSdrPageView(), SdrInsertFlags::DONTMARK);
- pNewObj->SetChanged();
- pNewObj->BroadcastObjectChange();
+ if (InsertObjectAtView(pNewObj, *GetSdrPageView(), SdrInsertFlags::DONTMARK))
+ {
+ pNewObj->SetChanged();
+ pNewObj->BroadcastObjectChange();
+ }
}
}
}
More information about the Libreoffice-commits
mailing list