[Libreoffice-commits] core.git: 2 commits - sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 20 14:23:22 UTC 2019
sc/source/filter/lotus/op.cxx | 15 +++++++--------
sc/source/ui/dbgui/csvruler.cxx | 4 ++++
2 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 531600e390ec14f5ac39979d8234283993a85ef9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Oct 20 12:30:32 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 20 16:22:35 2019 +0200
cid#1448338 Untrusted value as argument
Change-Id: Ifba1ab62cb7681a5fba2e50fb74870e234f14769
Reviewed-on: https://gerrit.libreoffice.org/81161
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index a9a3ba9692f6..b59550f80338 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -576,12 +576,9 @@ void OP_SheetName123(LotusContext& rContext, SvStream& rStream, sal_uInt16 nLeng
}
// B0 36 [sheet number (2 bytes?)] [sheet name (null terminated char array)]
-
- sal_uInt16 nDummy;
- rStream.ReadUInt16( nDummy ); // ignore the first 2 bytes (B0 36).
- rStream.ReadUInt16( nDummy );
- SCTAB nSheetNum = static_cast<SCTAB>(nDummy);
- rContext.pDoc->MakeTable(nSheetNum);
+ rStream.SeekRel(2); // ignore the first 2 bytes (B0 36).
+ sal_uInt16 nSheetNum(0);
+ rStream.ReadUInt16(nSheetNum);
::std::vector<sal_Char> sSheetName;
sSheetName.reserve(nLength-4);
@@ -592,10 +589,12 @@ void OP_SheetName123(LotusContext& rContext, SvStream& rStream, sal_uInt16 nLeng
sSheetName.push_back(c);
}
+ if (!ValidTab(nSheetNum))
+ return;
+
+ rContext.pDoc->MakeTable(nSheetNum);
if (!sSheetName.empty())
{
- if (!ValidTab(nSheetNum) || nSheetNum >= rContext.pDoc->GetTableCount())
- return;
OUString aName(sSheetName.data(), strlen(sSheetName.data()), rContext.eCharVon);
rContext.pDoc->RenameTab(nSheetNum, aName);
}
commit dbf445b69100c4cb931179abc316a456e02a60df
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Oct 20 12:17:55 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 20 16:22:22 2019 +0200
cid#1454871 uninitialized member
Change-Id: Ice63beecf4adf0a0799efee09ffb77d85996345b
Reviewed-on: https://gerrit.libreoffice.org/81160
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 2812f1a5ffbc..294f22526974 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -94,6 +94,10 @@ ScCsvRuler::ScCsvRuler(ScCsvLayoutData& rData, ScCsvTableBox* pTableBox)
: ScCsvControl(rData)
, mpTableBox(pTableBox)
, mnPosCursorLast(1)
+ , mnPosMTStart(0)
+ , mnPosMTCurr(0)
+ , mbPosMTMoved(false)
+ , mnSplitSize(0)
, mbTracking(false)
{
}
More information about the Libreoffice-commits
mailing list