connectivity/source/drivers/dbase/DTable.cxx | 5 +++++ connectivity/source/inc/dbase/DTable.hxx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
New commits: commit 259a1365ff9a730b0e2929d027a81ca5ebcb3c67 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Sep 23 15:35:21 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Sep 23 18:03:13 2021 +0200 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 <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> 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);