[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - connectivity/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 24 09:20:06 UTC 2021


 connectivity/source/drivers/dbase/DTable.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 5b94d2f99fe4a80d53de28f15dbeec05f231bc90
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 23 15:57:23 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri Sep 24 11:19:30 2021 +0200

    EOF isn't an error from SvStream::GetError perspective
    
    Change-Id: Ib2bc2c35d78d92728d592676def300e28a8b9e2a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122442
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 34ea6dfe163c..b6b1e7a7c3d1 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -318,17 +318,13 @@ void ODbaseTable::fillColumns()
     for (; i < nFieldCount; i++)
     {
         DBFColumn aDBFColumn;
-#if !defined(NDEBUG)
-        sal_uInt64 const nOldPos(m_pFileStream->Tell());
-#endif
         m_pFileStream->ReadBytes(aDBFColumn.db_fnm, 11);
         m_pFileStream->ReadUChar(aDBFColumn.db_typ);
         m_pFileStream->ReadUInt32(aDBFColumn.db_adr);
         m_pFileStream->ReadUChar(aDBFColumn.db_flng);
         m_pFileStream->ReadUChar(aDBFColumn.db_dez);
         m_pFileStream->ReadBytes(aDBFColumn.db_free2, 14);
-        assert(m_pFileStream->GetError() || m_pFileStream->Tell() == nOldPos + sizeof(aDBFColumn));
-        if (m_pFileStream->GetError())
+        if (!m_pFileStream->good())
         {
             SAL_WARN("connectivity.drivers", "ODbaseTable::fillColumns: short read!");
             break;


More information about the Libreoffice-commits mailing list