fpicker/source/office/fileview.cxx               |   10 +++++++---
 hwpfilter/source/hwpread.cxx                     |    1 +
 lotuswordpro/source/filter/lwpdrawobj.cxx        |    6 +++++-
 svtools/source/dialogs/ServerDetailsControls.cxx |    2 ++
 4 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit a291c5a4912c09fe1e774b8dae104de65a21acb6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Nov 24 20:27:48 2021 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Mar 18 15:17:31 2022 +0100

    tdf#145842 canceling remote file delete makes file disappear from treeview
    
    we remove the selected entries from the treeview, so the user cancel's
    the deletion of an entry we should unselect it from the candidates to
    remove.
    
    and...
    
    Related: tdf#145842 fix a crash after deleting an entry
    
    delete an entry in remote files dialog and go one level up and crash,
    ownership of the SvtContentEntry is not with the entry, but belongs
    to mpImpl->maEntries
    
    Change-Id: Ieb2258960fc647ad15d8f315a18454a0dae8a420
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125793
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 9d13202243b26d507b61eb4a787d1df2ce037e21)

diff --git a/fpicker/source/office/fileview.cxx 
b/fpicker/source/office/fileview.cxx
index 5b65eb1295cf..64dee0ee6239 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -636,16 +636,20 @@ void ViewTabListBox_Impl::DeleteEntries()
             eResult = aDlg.run();
         }
 
-        if ( ( eResult == svtools::QUERYDELETE_ALL ) ||
-             ( eResult == svtools::QUERYDELETE_YES ) )
+        bool bDeleted = false;
+
+        if (eResult == svtools::QUERYDELETE_ALL || eResult == 
svtools::QUERYDELETE_YES)
         {
             if ( Kill( aURL ) )
             {
-                delete 
reinterpret_cast<SvtContentEntry*>(mxTreeView->get_id(rCurEntry).toInt64());
                 mpParent->EntryRemoved( aURL );
+                bDeleted = true;
             }
         }
 
+        if (!bDeleted)
+            mxTreeView->unselect(rCurEntry);
+
         return false;
     });
 
commit f8870c8a053ea021a4ad8598851a120b02620bb5
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Nov 24 17:07:29 2021 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Mar 18 15:17:10 2022 +0100

    Resolves: tdf#145840 call ToggledDavsHdl on setting checkbox state
    
    Change-Id: Ia2a735255b94fd3a097081950e2145e07b4b3b63
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125723
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit b23a16ff513369b6bf1f534a387d911b6336c9c8)

diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx 
b/svtools/source/dialogs/ServerDetailsControls.cxx
index bfbc2e21593b..b3724f87ee00 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -175,11 +175,13 @@ bool DavDetailsContainer::verifyScheme( const OUString& 
rScheme )
     {
         bValid = true;
         m_pDialog->m_xCBDavs->set_active(false);
+        ToggledDavsHdl(*m_pDialog->m_xCBDavs);
     }
     else if ( rScheme == "https://"; )
     {
         bValid = true;
         m_pDialog->m_xCBDavs->set_active(true);
+        ToggledDavsHdl(*m_pDialog->m_xCBDavs);
     }
     return bValid;
 }
commit 558b947318caeb97f3ef9a54e0f79fc96cb43187
Author:     Michael Stahl <[email protected]>
AuthorDate: Fri Mar 11 17:29:41 2022 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Mar 18 15:16:01 2022 +0100

    hwpfilter: why isn't that path string null terminated
    
    Change-Id: Iaedc23bd91d0d46e34d55dcc65760b73c5772b7e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131559
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 4c86ed851bc1c0a2414e254082064760c99437f1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131589
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit dc566a7f687a728311490b5f4f624897f0aefd1d)

diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 61c427ad836c..f450a98a6e87 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -453,6 +453,7 @@ bool Picture::Read(HWPFile & hwpf)
     scale[1] = tmp16;
 
     hwpf.ReadBlock(picinfo.picun.path, 256);      /* Picture File Name: when 
type is not a Drawing. */
+    picinfo.picun.path[255] = 0; // ensure null terminated
     hwpf.ReadBlock(reserved3, 9);                 /* Brightness / Contrast / 
Picture Effect, etc. */
 
     UpdateBBox(this);
commit dd7ee624349218d09ba03f6714d683b6a7d1125f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Mar 13 10:48:47 2022 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Mar 18 15:15:57 2022 +0100

    ofz#45524 string is presumed to be at least length 1
    
    Change-Id: If8a86e399109b414cf53f6e2bffdd3c7c6faa490
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131468
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit eca150aeb9254a3c04d15be5a6278c2c65bf3fb0)

diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx 
b/lotuswordpro/source/filter/lwpdrawobj.cxx
index fd5355ac3295..1489cf14cfdb 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1255,7 +1255,11 @@ void LwpDrawTextArt::Read()
                                                     - 
(m_aTextArtRec.aPath[1].n*3 + 1)*4;
 
 
-    if (!m_pStream->good() || m_aTextArtRec.nTextLen > 
m_pStream->remainingSize())
+    if (!m_pStream->good())
+        throw BadRead();
+    if (m_aTextArtRec.nTextLen > m_pStream->remainingSize())
+        throw BadRead();
+    if (m_aTextArtRec.nTextLen < 1)
         throw BadRead();
 
     m_aTextArtRec.pTextString = new sal_uInt8 [m_aTextArtRec.nTextLen];

Reply via email to