summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-23 15:35:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-23 18:03:13 +0200
commit259a1365ff9a730b0e2929d027a81ca5ebcb3c67 (patch)
treebfc193b9ed071705b088991aa5205bd2149161c5 /connectivity
parent36940a6506d72b91e6f9fc33ec42b57058ebc5da (diff)
don't looks for dbt memo files when fuzzing
Change-Id: I483606a36d8a91fe7af73f1c6dba740b2475e95d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122533 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx5
-rw-r--r--connectivity/source/inc/dbase/DTable.hxx2
2 files changed, 6 insertions, 1 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 39ea5e22da79..615a52c4a569 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -40,6 +40,7 @@
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/string.hxx>
+#include <unotools/configmgr.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbhelper.hxx>
#include <comphelper/types.hxx>
@@ -1360,6 +1361,10 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
return true;
}
+bool ODbaseTable::HasMemoFields() const
+{
+ return m_aHeader.type > dBaseIV && !utl::ConfigManager::IsFuzzing();
+}
// creates in principle dBase III file format
bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx
index 79048b56d96f..6e7b2e184c32 100644
--- a/connectivity/source/inc/dbase/DTable.hxx
+++ b/connectivity/source/inc/dbase/DTable.hxx
@@ -115,7 +115,7 @@ namespace connectivity::dbase
void copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos);
bool CreateFile(const INetURLObject& aFile, bool& bCreateMemo);
bool CreateMemoFile(const INetURLObject& aFile);
- bool HasMemoFields() const { return m_aHeader.type > dBaseIV;}
+ bool HasMemoFields() const;
void ReadMemoHeader();
bool ReadMemo(std::size_t nBlockNo, ORowSetValue& aVariable);