未验证 提交 c89045dc 编写于 作者: 张泊远yg 提交者: Gitee

update ipc/native/src/napi/src/napi_message_sequence.cpp.

Signed-off-by: 张泊远yg <zhangboyuan1@huawei.com> 
Signed-off-by: N张泊远yg <zhangboyuan1@huawei.com>
上级 49f6d614
...@@ -60,7 +60,8 @@ static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_IPC, ...@@ -60,7 +60,8 @@ static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_IPC,
#define CHECK_READ_LENGTH(env, arrayLength, typeSize, napiParcel) \ #define CHECK_READ_LENGTH(env, arrayLength, typeSize, napiParcel) \
do { \ do { \
size_t remainSize = (napiParcel)->nativeParcel_->GetDataSize() - (napiParcel)->nativeParcel_->GetReadPosition(); \ size_t remainSize = (napiParcel)->nativeParcel_->GetDataSize() - \
(napiParcel)->nativeParcel_->GetReadPosition(); \
if (((arrayLength) < 0) || ((arrayLength) > remainSize) || (((arrayLength) * (typeSize)) > remainSize)) { \ if (((arrayLength) < 0) || ((arrayLength) > remainSize) || (((arrayLength) * (typeSize)) > remainSize)) { \
ZLOGI(LOG_LABEL, "No enough data to read"); \ ZLOGI(LOG_LABEL, "No enough data to read"); \
napi_throw_range_error(env, nullptr, "No enough data to read"); \ napi_throw_range_error(env, nullptr, "No enough data to read"); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册