[Libreoffice-commits] core.git: sw/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 6 10:14:31 UTC 2021


 sw/source/filter/html/wrthtml.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 415e250e0fd3aa46327ad3857fa0d6eef83bb7c5
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Apr 6 11:05:32 2021 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Apr 6 12:13:58 2021 +0200

    Check for null SW_MOD
    
    This prevents "read access violation. this was 0xC0" at shutdown when
    running 'make CppunitTest_sw_uiwriter3 CPPUNIT_TEST_NAME=testTdf136740'
    with this BT:
    
      swlo.dll!std::unique_ptr<SwMasterUsrPref,o3tl::default_delete<SwMasterUsrPref>>::operator bool() Line 3419    C++
      swlo.dll!SwModule::GetMetric(bool bWeb) Line 594      C++
      swlo.dll!SwHTMLWriter::WriteStream() Line 307 C++
      swlo.dll!Writer::Write(SwPaM & rPaM, SvStream & rStrm, const rtl::OUString * pFName) Line 272 C++
      swlo.dll!SwWriter::Write(const tools::SvRef<Writer> & rxWriter, const rtl::OUString * pRealFileName) Line 862 C++
      swlo.dll!SwTransferable::WriteObject(tools::SvRef<SotTempStream> & xStream, void * pObject, unsigned long nObjectType, const com::sun::star::datatransfer::DataFlavor & __formal) Line 824    C++
      vcllo.dll!TransferableHelper::SetObject(void * pUserObject, unsigned long nUserObjectId, const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 883   C++
      swlo.dll!SwTransferable::GetData(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 623   C++
      vcllo.dll!TransferableHelper::getTransferData2(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 390     C++
      vcllo.dll!TransferableHelper::getTransferData(const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 288      C++
      vclplug_winlo.dll!CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium(tagFORMATETC & fetc, tagSTGMEDIUM & stgmedium) Line 516       C++
      vclplug_winlo.dll!CXTDataObject::renderSynthesizedFormatAndSetupStgMedium(tagFORMATETC & fetc, tagSTGMEDIUM & stgmedium) Line 419     C++
      vclplug_winlo.dll!`CXTDataObject::GetData'::`1'::catch$1() Line 269   C++
      vcruntime140_1d.dll!_CallSettingFrame_LookupContinuationIndex() Line 98       Unknown
      vcruntime140_1d.dll!__FrameHandler4::CxxCallCatchBlock(_EXCEPTION_RECORD * pExcept) Line 1393 C++
      ntdll.dll!RcConsolidateFrames
()	Unknown
      vclplug_winlo.dll!CXTDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 261  C++
      vclplug_winlo.dll!CXNotifyingDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 86   C++
      ole32.dll!HandleFromHandle(IDataObject * pDataObj, tagFORMATETC * pformatetc, tagSTGMEDIUM * pmedium) Line 2048       C++
      ole32.dll!RenderCurrentFormat(HWND__ * hClipWnd, unsigned int cf, tagSTGMEDIUM * pmedium, IDataObject * pDataObj) Line 4057   C++
      ole32.dll!RenderFormat(HWND__ * hClipWnd, unsigned int cf, IDataObject * pDataObj, void * pvMTADataObject) Line 4191  C++
      ole32.dll!ClipboardWndProc(HWND__ * hWnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 683 C++
      user32.dll!UserCallWinProcCheckWow()  Unknown
      user32.dll!DispatchClientMessage()    Unknown
      user32.dll!__fnDWORD
()	Unknown
      ntdll.dll!KiUserCallbackDispatcherContinue
()	Unknown
      win32u.dll!NtUserGetMessage
()	Unknown
      user32.dll!GetMessageW()      Unknown
      vclplug_winlo.dll!CMtaOleClipboard::run() Line 663    C++
      vclplug_winlo.dll!CMtaOleClipboard::oleThreadProc(void * pParam) Line 692     C++
      ucrtbased.dll!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97 C++
      kernel32.dll!BaseThreadInitThunk
()	Unknown
      ntdll.dll!RtlUserThreadStart
()	Unknown
    
    Change-Id: I79c018781fb8c84a638a714bd3685fe2208697db
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113625
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 1094f3ac36c9..c01c6bdc9966 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -242,6 +242,8 @@ void SwHTMLWriter::SetupFilterOptions(const OUString& rFilterOptions)
 
 ErrCode SwHTMLWriter::WriteStream()
 {
+    if (!SW_MOD())
+        return ERRCODE_ABORT;
     // Intercept paste output if requested.
     char* pPasteEnv = getenv("SW_DEBUG_HTML_PASTE_TO");
     std::unique_ptr<SvStream> pPasteStream;


More information about the Libreoffice-commits mailing list