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 a7851ffd3edc94ad107c877c0afb3c2359c82ef1..066428288aa167553a71b3e2e08a353f38ca06d7 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");