mirror of
https://github.com/LibreOffice/online.git
synced 2025-07-25 16:04:48 +00:00
libfuzzer: fix build
And bypass configuration access at two new places, so the fuzzer can find more interesting failures. Change-Id: I4c09172e781a7c6120b8c4befe1a84fdd74f2ddc Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93617 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
@ -16,12 +16,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
std::string uri;
|
||||
Poco::URI uriPublic;
|
||||
std::string docKey = "/fuzz/fuzz.odt";
|
||||
auto docBroker = std::make_shared<DocumentBroker>(uri, uriPublic, docKey);
|
||||
auto docBroker = std::make_shared<DocumentBroker>(DocumentBroker::ChildType::Interactive, uri,
|
||||
uriPublic, docKey);
|
||||
|
||||
std::shared_ptr<ProtocolHandlerInterface> ws;
|
||||
std::string id;
|
||||
bool isReadOnly = false;
|
||||
const ServerURL serverURL("", "");
|
||||
const ServerURL serverURL;
|
||||
auto session
|
||||
= std::make_shared<ClientSession>(ws, id, docBroker, uriPublic, isReadOnly, serverURL);
|
||||
|
||||
|
@ -273,7 +273,7 @@ public:
|
||||
static bool isSSLEnabled()
|
||||
{
|
||||
#if ENABLE_SSL
|
||||
return LOOLWSD::SSLEnabled.get();
|
||||
return !Util::isFuzzing() && LOOLWSD::SSLEnabled.get();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@ -282,7 +282,7 @@ public:
|
||||
static bool isSSLTermination()
|
||||
{
|
||||
#if ENABLE_SSL
|
||||
return LOOLWSD::SSLTermination.get();
|
||||
return !Util::isFuzzing() && LOOLWSD::SSLTermination.get();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user