Fuzzing: Discard logging output from QSslCertificate

It's pointless in a fuzzer and slows down execution.

Change-Id: I0d36ed8814cf8fb332c196ea7e24eae8ee4d3c6e
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
This commit is contained in:
Robert Löhning 2021-05-27 22:18:39 +02:00
parent 75cdbb85ea
commit 82499a6a28

View File

@ -29,6 +29,10 @@
#include <QSslCertificate>
extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {
// to reduce noise and increase speed
static char quiet[] = "QT_LOGGING_RULES=qt.network.ssl=false";
static int pe = putenv(quiet);
Q_UNUSED(pe);
QSslCertificate ssl(QByteArray::fromRawData(Data, Size), QSsl::Pem);
return 0;
}