mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
fix checker for unreasonable size of vector of bools
This commit is contained in:
parent
cfea3cba9b
commit
1d0c3d7168
1 changed files with 1 additions and 1 deletions
|
@ -730,7 +730,7 @@ int OctreePacketData::unpackDataFromBytes(const unsigned char* dataBytes, QVecto
|
||||||
uint16_t length;
|
uint16_t length;
|
||||||
memcpy(&length, dataBytes, sizeof(uint16_t));
|
memcpy(&length, dataBytes, sizeof(uint16_t));
|
||||||
dataBytes += sizeof(length);
|
dataBytes += sizeof(length);
|
||||||
if (length * sizeof(bool) > MAX_OCTREE_UNCOMRESSED_PACKET_SIZE) {
|
if (length / 8 > MAX_OCTREE_UNCOMRESSED_PACKET_SIZE) {
|
||||||
result.resize(0);
|
result.resize(0);
|
||||||
return sizeof(uint16_t);
|
return sizeof(uint16_t);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue