[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - basic/source toolkit/source
basic/source/sbx/sbxarray.cxx |6 +- toolkit/source/awt/vclxwindow.cxx |2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit b2fa854e81d329c9ed49bd10944cea1a430ecf7e Author: Noel Grandin AuthorDate: Mon Jan 14 13:19:32 2019 +0200 Commit: Noel Grandin CommitDate: Tue Jan 15 06:56:54 2019 +0100 tdf#122250 Crash when running extension as a consequence of commit 4e07987ce8134312920682e3481c3f8e3d7b66c3 Date: Thu Aug 25 15:08:55 2016 +0200 cid#1371154 Missing move assignment operator this extensions appears to pass bogus data into VCLXWindow::setProperty, so I had to workaround that when debugging Change-Id: Ib6728c0a990bd7cfbfed43d79b7560bd2f7f5a67 Reviewed-on: https://gerrit.libreoffice.org/66297 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 668b4df03bc5..c6ccb208065c 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -198,10 +198,14 @@ void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx ) if( eType != SbxOBJECT || pVar->GetClass() != SbxClassType::Object ) pVar->Convert( eType ); SbxVariableRef& rRef = GetRef( nIdx ); +// tdf#122250. It is possible that I hold the last reference to myself, so check, otherwise I might +// call SetFlag on myself after I have died. +bool removingMyself = rRef.get() && rRef->GetParameters() == this && GetRefCount() == 1; if(rRef.get() != pVar ) { rRef = pVar; -SetFlag( SbxFlagBits::Modified ); +if (!removingMyself) +SetFlag( SbxFlagBits::Modified ); } } } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 45c7d1dcdc62..6d89c13f3697 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -1722,6 +1722,8 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any& WinBits nStyle = pWindow->GetStyle(); sal_uInt16 nTmp = 0; Value >>= nTmp; +// clear any dodgy bits passed in, can come from dodgy extensions +nTmp &= o3tl::typed_flags::mask; WindowBorderStyle nBorder = static_cast(nTmp); if ( !bool(nBorder) ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - basic/source
basic/source/runtime/dllmgr-x64.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7951138541caabcd25fccaa8f9ebb0226ce2ce12 Author: Mike Kaganski AuthorDate: Fri Oct 19 14:54:28 2018 +0200 Commit: Eike Rathke CommitDate: Sat Oct 20 14:43:29 2018 +0200 tdf#120706: nullptr dereference Change-Id: I55814a6b4cdfda93a51621b5b31c166507a7e7a6 Reviewed-on: https://gerrit.libreoffice.org/62005 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 49d304c4f6635381a27b60a8944744cc81ff1e91) Reviewed-on: https://gerrit.libreoffice.org/62028 Reviewed-by: Eike Rathke diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx index 2c311861122a..85af90b53f79 100644 --- a/basic/source/runtime/dllmgr-x64.cxx +++ b/basic/source/runtime/dllmgr-x64.cxx @@ -475,7 +475,7 @@ ErrCode call( OUString const & dll, ProcData const & proc, SbxArray * arguments, SbxVariable & result) { -if (arguments->Count() > 20) +if (arguments && arguments->Count() > 20) return ERRCODE_BASIC_NOT_IMPLEMENTED; std::vector< char > stack; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - basic/source editeng/source include/svl sc/source sfx2/source svl/qa svl/source svtools/source sw/source xmloff/source
basic/source/runtime/runtime.cxx|4 ++-- basic/source/sbx/sbxdate.cxx|4 ++-- basic/source/sbx/sbxscan.cxx|8 editeng/source/items/flditem.cxx|2 +- include/svl/zforlist.hxx|2 +- sc/source/filter/excel/xistyle.cxx |2 +- sc/source/ui/docshell/impex.cxx |2 +- sfx2/source/bastyp/sfxhtml.cxx |2 +- svl/qa/unit/svl.cxx |2 +- svl/source/numbers/numfmuno.cxx |4 +++- svl/source/numbers/zforlist.cxx | 12 ++-- svl/source/numbers/zformat.cxx |2 +- svl/source/numbers/zforscan.cxx |4 ++-- svl/source/numbers/zforscan.hxx |6 +++--- svtools/source/control/fmtfield.cxx |2 +- sw/source/core/fields/fldbas.cxx|6 +++--- sw/source/filter/ww8/ww8par5.cxx|2 +- xmloff/source/style/xmlnumfe.cxx|2 +- 18 files changed, 35 insertions(+), 33 deletions(-) New commits: commit 04e12e17cd7a9b7e740299560e8e3e0ba2822ca3 Author: Eike Rathke AuthorDate: Thu Aug 16 15:50:02 2018 +0200 Commit: Caolán McNamara CommitDate: Fri Aug 17 17:17:52 2018 +0200 Resolves: tdf#119013 do not over-aggressively reorder date particles In particular not when reading documents as we don't know what the original (default/system) locale was when the date format was created and stored and whether the format's date order actually matched the locale's ordering. Regression from commit 51478cefaa4e265b42e3f67eda0a64767ff3efba CommitDate: Tue Apr 18 17:01:27 2017 +0200 Resolves: tdf#107012 follow date order of the target locale Change-Id: I9d3bdbd512d95ed81ff6459e368a2d7497ec8a2d Reviewed-on: https://gerrit.libreoffice.org/59182 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit 5b8007afdb97d416ee7c22bf9226e927d61e9bd3) Reviewed-on: https://gerrit.libreoffice.org/59215 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 9f242dab4ba8..42e97c704a26 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -438,12 +438,12 @@ std::shared_ptr SbiInstance::PrepareNumberFormatter( sal_uInt } OUString aStr( aDateStr ); // PutandConvertEntry() modifies string! pNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType, -rnStdDateIdx, LANGUAGE_ENGLISH_US, eLangType ); +rnStdDateIdx, LANGUAGE_ENGLISH_US, eLangType, true); nCheckPos = 0; aDateStr += " HH:MM:SS"; aStr = aDateStr; pNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType, -rnStdDateTimeIdx, LANGUAGE_ENGLISH_US, eLangType ); +rnStdDateTimeIdx, LANGUAGE_ENGLISH_US, eLangType, true); return pNumberFormatter; } diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index abf30c202e7d..1880ba40df78 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -142,7 +142,7 @@ double ImpGetDate( const SbxValues* p ) OUString aStr = aDateStr + " HH:MM:SS"; pFormatter->PutandConvertEntry( aStr, nCheckPos, nType, -nIndex, LANGUAGE_ENGLISH_US, eLangType ); +nIndex, LANGUAGE_ENGLISH_US, eLangType, true); bool bSuccess = pFormatter->IsNumberFormat( *p->pOUString, nIndex, nRes ); if ( bSuccess ) { @@ -337,7 +337,7 @@ start: nType, nIndex, LANGUAGE_ENGLISH_US, -eLangType ); +eLangType, true); pFormatter->GetOutputString( n, nIndex, *p->pOUString, ); #endif break; diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 7f9b4931ea48..49f632ff1a57 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -719,7 +719,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const else { aFmtStr = OUString::createFromAscii(pInfo->mpOOoFormat); -pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType ); +pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType, true); } pFormatter->GetOutputString( nNumber, nIndex, rRes, ); } @@ -736,7 +736,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const if( floor( nNumber ) != nNumber ) { aFmtStr = "H:MM:SS AM/PM"; -
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - basic/source
basic/source/comp/scanner.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f2d5ba04a7660ecea326d90d08ec8002462883a5 Author: Caolán McNamara Date: Mon May 28 21:51:01 2018 +0100 forcepoint#42 check available str length Change-Id: Ie476968ddaa4c3e5475ae9aa6133e7aba38d5975 Reviewed-on: https://gerrit.libreoffice.org/54977 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index f29b5c2a5d9f..e79f145c29b9 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -606,7 +606,7 @@ bool SbiScanner::NextSym() case '>': if( *pLine == '=' ) n = 2; break; case ':': if( *pLine == '=' ) n = 2; break; } -aSym = aLine.copy( nCol, n ); +aSym = aLine.copy(nCol, std::min(n, aLine.getLength() - nCol)); pLine += n-1; nCol = nCol + n; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits