From 9f345bdc0fbbc7a130e87ba3a5a77fd7d62373b1 Mon Sep 17 00:00:00 2001 From: wuzhihuitmac Date: Wed, 4 Dec 2024 09:16:17 +0800 Subject: [PATCH] add cfi uncheck for DecodeEffect Signed-off-by: wuzhihuitmac Change-Id: I414cae64f2ff2be38d2570e60b9ba4d9e6602781 --- .../haptic_decoder/oh_json/src/default_vibrator_decoder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/haptic_decoder/oh_json/src/default_vibrator_decoder.cpp b/utils/haptic_decoder/oh_json/src/default_vibrator_decoder.cpp index a7851ff..0664282 100644 --- a/utils/haptic_decoder/oh_json/src/default_vibrator_decoder.cpp +++ b/utils/haptic_decoder/oh_json/src/default_vibrator_decoder.cpp @@ -50,7 +50,7 @@ constexpr int32_t MAX_JSON_FILE_SIZE = 64 * 1024; } // namespace int32_t DefaultVibratorDecoder::DecodeEffect(const RawFileDescriptor &rawFd, const JsonParser &parser, - VibratePackage &patternPackage) + VibratePackage &patternPackage) __attribute__((no_sanitize("cfi"))) { if ((rawFd.fd < 0) || (rawFd.offset < 0) || (rawFd.length <= 0) || (rawFd.length > MAX_JSON_FILE_SIZE)) { MISC_HILOGE("Invalid file descriptor, fd:%{public}d, offset:%{public}" PRId64 ", length:%{public}" PRId64, @@ -272,7 +272,8 @@ int32_t DefaultVibratorDecoder::ParseCurve(const JsonParser &parser, cJSON *curv return SUCCESS; } -void DefaultVibratorDecoder::PatternSplit(VibratePattern &originPattern, VibratePackage &patternPackage) +void DefaultVibratorDecoder::PatternSplit(VibratePattern &originPattern, + VibratePackage &patternPackage) __attribute__((no_sanitize("cfi"))) { if (originPattern.events.empty()) { MISC_HILOGI("The origin pattern is empty"); -- Gitee