mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-24 07:31:57 +00:00
解决asan下imageFUZZ编译失败问题
Signed-off-by: kangchongtao <kangchongtao@huawei.com>
This commit is contained in:
parent
38dc002cfe
commit
39ae7db3d1
@ -20,6 +20,7 @@ group("fuzztest") {
|
||||
"arkressched_fuzzer:ArkResschedFuzzTest",
|
||||
|
||||
#"imageApi_fuzzer:ImageApiFuzzTest",
|
||||
"imageloader_fuzzer:ImageLoaderFuzzTest",
|
||||
"manifest_fuzzer:ManifestFuzzTest",
|
||||
"res2_fuzzer:Res2FuzzTest",
|
||||
"res_fuzzer:ResFuzzTest",
|
||||
@ -29,7 +30,4 @@ group("fuzztest") {
|
||||
"utilengine_fuzzer:UtilEngineFuzzTest",
|
||||
"utilmost_fuzzer:UtilMostFuzzTest",
|
||||
]
|
||||
if (!is_asan) {
|
||||
deps += [ "imageloader_fuzzer:ImageLoaderFuzzTest" ]
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,9 @@ ohos_fuzztest("ImageLoaderFuzzTest") {
|
||||
|
||||
#"$ace_root/frameworks/base/resource/internal_resource.cpp",
|
||||
"$ace_root/frameworks/base/log/ace_tracker.cpp",
|
||||
"$ace_root/frameworks/core/common/event_manager.cpp",
|
||||
"$ace_root/frameworks/core/components/test/unittest/mock/event_report_mock.cpp",
|
||||
"$ace_root/frameworks/core/components_ng/gestures/gesture_referee.cpp",
|
||||
"$ace_root/frameworks/core/image/flutter_image_cache.cpp",
|
||||
"$ace_root/frameworks/core/image/image_cache.cpp",
|
||||
"$ace_root/frameworks/core/image/image_compressor.cpp",
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
#include "utilengine_fuzzer.h"
|
||||
|
||||
#include <securec.h>
|
||||
#include "test/fuzztest/utilengine_fuzzer/utilengine_fuzzer.h"
|
||||
|
||||
#include "frameworks/bridge/common/utils/engine_helper.h"
|
||||
#include "frameworks/bridge/js_frontend/engine/common/js_engine_loader.h"
|
||||
|
||||
@ -31,7 +31,7 @@ namespace OHOS {
|
||||
if (size < sizeInt) {
|
||||
return false;
|
||||
}
|
||||
memcpy(&id, data, sizeof(uint32_t));
|
||||
memcpy_s(&id, sizeof(uint32_t), data, sizeof(uint32_t));
|
||||
auto& loader = Framework::JsEngineLoader::GetDeclarative(DECLARATIVE_ENGINE_SHARED_LIB);
|
||||
auto jsEngine = loader.CreateJsEngine(id);
|
||||
EngineHelper::AddEngine(id, jsEngine);
|
||||
|
Loading…
Reference in New Issue
Block a user