mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-06 09:15:23 +08:00
qt 6.5.1 original
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(result LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core)
|
||||
|
||||
qt_add_executable(result
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(result PUBLIC
|
||||
Qt::Core
|
||||
)
|
||||
if(DEFINED ENV{LIB_FUZZING_ENGINE})
|
||||
target_link_libraries(result PRIVATE
|
||||
$ENV{LIB_FUZZING_ENGINE}
|
||||
)
|
||||
else()
|
||||
target_link_libraries(result PRIVATE
|
||||
-fsanitize=fuzzer
|
||||
)
|
||||
endif()
|
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include <QCryptographicHash>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {
|
||||
for (QCryptographicHash::Algorithm algo = QCryptographicHash::Md4;
|
||||
algo <= QCryptographicHash::RealSha3_512;
|
||||
algo = QCryptographicHash::Algorithm(algo + 1)) {
|
||||
QCryptographicHash qh(algo);
|
||||
qh.addData(QByteArray::fromRawData(Data, Size));
|
||||
qh.result();
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user