1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Sanitize invalid particle spawner time (#15465)

This commit is contained in:
Lars Müller 2024-11-24 19:23:53 +01:00 committed by GitHub
parent 11b19cd126
commit b77ad82fb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 0 deletions

View file

@ -4,6 +4,7 @@
#include "client/client.h"
#include "exceptions.h"
#include "irr_v2d.h"
#include "util/base64.h"
#include "client/camera.h"
@ -1007,6 +1008,8 @@ void Client::handleCommand_AddParticleSpawner(NetworkPacket* pkt)
p.amount = readU16(is);
p.time = readF32(is);
if (p.time < 0)
throw SerializationError("particle spawner time < 0");
bool missing_end_values = false;
if (m_proto_ver >= 42) {