diff --git a/frameworks/js/napi/inputmethodclient/js_utils.cpp b/frameworks/js/napi/inputmethodclient/js_utils.cpp index eb1c266efd7e0424f174b7e874bb4e67491d2d09..a14d0880dc2f9940be9c32d91f85fed7e628b5bc 100644 --- a/frameworks/js/napi/inputmethodclient/js_utils.cpp +++ b/frameworks/js/napi/inputmethodclient/js_utils.cpp @@ -19,7 +19,7 @@ namespace OHOS { namespace MiscServices { -constexpr int32_t STR_MAX_LENGTH = 4096; +constexpr int32_t STR_MAX_LENGTH = 1024 * 1024 * 128; // 128MB constexpr size_t STR_TAIL_LENGTH = 1; constexpr size_t ARGC_MAX = 6; constexpr size_t ARGC_ONE = 1; @@ -291,7 +291,7 @@ napi_status JsUtils::GetValue(napi_env env, napi_value in, std::string &out) } if (maxLen > STR_MAX_LENGTH) { - IMSA_HILOGE("string length is too long."); + IMSA_HILOGE("string length is too long, maxLen: %{public}zu.", maxLen); return napi_generic_failure; } IMSA_HILOGD("napi_value -> std::string get length %{public}zu", maxLen);