BugID:21970371:[infra]fix out of bounds write issue in IOCTL
@@ -83,14 +83,14 @@ int IOT_Ioctl(int option, void *data)
switch (option) {
case IOTX_IOCTL_SET_REGION: {
- ctx->domain_type = *(int *)data;
+ ctx->domain_type = *(iotx_mqtt_region_types_t *)data;
/* iotx_guider_set_region(*(int *)data); */
res = SUCCESS_RETURN;
}
break;
case IOTX_IOCTL_GET_REGION: {
- *(int *)data = ctx->domain_type;
+ *(iotx_mqtt_region_types_t *)data = ctx->domain_type;
res = SUCCESS_RETURN;
}
