mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-23 07:00:13 +00:00
代码绕过CFI防护整改
Signed-off-by: zhangdd_ewan <zhangdongdong50@huawei.com>
This commit is contained in:
parent
07055d86fe
commit
09e3dab777
@ -49,11 +49,10 @@ public:
|
||||
virtual void UnloadI18nServiceAbility() = 0;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Construct map from request codes to request handling functions.
|
||||
*/
|
||||
int32_t InitInnerFuncMap(uint32_t code, MessageParcel &data, MessageParcel &reply);
|
||||
int32_t InvokeInnerFunc(uint32_t code, MessageParcel &data, MessageParcel &reply);
|
||||
|
||||
/**
|
||||
* @brief Check whether caller's token type is system app or shell, and has UPDATE_CONFIGURATION permission.
|
||||
|
@ -49,7 +49,7 @@ int32_t I18nServiceAbilityStub::OnRemoteRequest(uint32_t code, MessageParcel &da
|
||||
return 0;
|
||||
}
|
||||
// map request code to corresponding process function.
|
||||
int32_t ret = InitInnerFuncMap(code, data, reply);
|
||||
int32_t ret = InvokeInnerFunc(code, data, reply);
|
||||
bool hasMappedInnerFunc = ret > -1;
|
||||
if (!hasMappedInnerFunc) {
|
||||
HILOG_INFO_I18N("I18nServiceAbilityStub::OnRemoteRequest invalid request code=%{public}u", code);
|
||||
@ -60,7 +60,7 @@ int32_t I18nServiceAbilityStub::OnRemoteRequest(uint32_t code, MessageParcel &da
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t I18nServiceAbilityStub::InitInnerFuncMap(uint32_t code, MessageParcel &data, MessageParcel &reply)
|
||||
int32_t I18nServiceAbilityStub::InvokeInnerFunc(uint32_t code, MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
switch (code) {
|
||||
case static_cast<uint32_t>(ILocaleConfigAbilityCode::SET_SYSTEM_LANGUAGE): {
|
||||
|
Loading…
Reference in New Issue
Block a user