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:
parent
11b19cd126
commit
b77ad82fb9
3 changed files with 8 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue