!17316 修改上限值判断

Merge pull request !17316 from diaochenggong/master
This commit is contained in:
openharmony_ci 2024-11-21 09:43:02 +00:00 committed by Gitee
commit 17f31175e0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 3 deletions

View File

@ -340,6 +340,7 @@ enum class RSSurfaceNodeAbilityState : uint8_t {
constexpr int64_t NS_TO_S = 1000000000;
constexpr int64_t NS_PER_MS = 1000000;
constexpr uint32_t SIZE_UPPER_LIMIT = 1000;
constexpr uint32_t PARTICLE_EMMITER_UPPER_LIMIT = 2000;
constexpr uint32_t PARTICLE_UPPER_LIMIT = 1000000;
#if defined(M_PI)

View File

@ -840,7 +840,7 @@ bool RSMarshallingHelper::Unmarshalling(Parcel& parcel, std::vector<std::shared_
uint32_t size = parcel.ReadUint32();
bool success = true;
std::vector<std::shared_ptr<EmitterUpdater>> emitterUpdaters;
if (size > PARTICLE_UPPER_LIMIT) {
if (size > PARTICLE_EMMITER_UPPER_LIMIT) {
return false;
}
for (size_t i = 0; i < size; i++) {
@ -924,7 +924,7 @@ bool RSMarshallingHelper::Unmarshalling(Parcel& parcel, std::shared_ptr<Particle
}
uint32_t size = parcel.ReadUint32();
bool success = true;
if (size > PARTICLE_UPPER_LIMIT) {
if (size > PARTICLE_EMMITER_UPPER_LIMIT) {
return false;
}
std::shared_ptr<ParticleNoiseFields> noiseFields = std::make_shared<ParticleNoiseFields>();
@ -1228,7 +1228,7 @@ bool RSMarshallingHelper::Unmarshalling(Parcel& parcel, std::vector<std::shared_
uint32_t size = parcel.ReadUint32();
bool success = true;
std::vector<std::shared_ptr<ParticleRenderParams>> particlesRenderParams;
if (size > PARTICLE_UPPER_LIMIT) {
if (size > PARTICLE_EMMITER_UPPER_LIMIT) {
return false;
}
for (size_t i = 0; i < size; i++) {