mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-27 03:11:17 -04:00
解决同应用下调用ExecuteBatch,传入无效参数导致crash问题
Change-Id: Ic03c05bd2d6885afefb5f1b0526a85a99a60371a Signed-off-by: HuangXW <huangxinwei4@huawei.com>
This commit is contained in:
@@ -409,6 +409,10 @@ bool DataAbilityImpl::CheckExecuteBatchPermission(
|
||||
size_t size = operations.size();
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
std::shared_ptr<DataAbilityOperation> operation = operations[i];
|
||||
if (operation == nullptr) {
|
||||
HILOG_ERROR("operation[i] is nullptr, index: %{public}d", static_cast<int32_t>(i));
|
||||
return false;
|
||||
}
|
||||
if (operation->IsInsertOperation() || operation->IsUpdateOperation() || operation->IsDeleteOperation()) {
|
||||
needCheckWritePermission = true;
|
||||
} else if (operation->IsAssertOperation()) {
|
||||
|
||||
Reference in New Issue
Block a user