mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 02:35:28 +00:00
fix: limit how deep AMF3 arrays nest and stop at the end of the data
The AMF3 reader read an array inside an array to any depth and kept reading values after the data had ended. It now refuses arrays nested more than 64 deep and throws when the data ends before a value does. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,9 @@ private:
|
||||
*/
|
||||
std::vector<std::string> accessedElements;
|
||||
|
||||
// How deeply nested the array being read is.
|
||||
/**
|
||||
* How many arrays are being read at the moment, each one inside the one before it.
|
||||
*/
|
||||
uint32_t m_Depth = 0;
|
||||
|
||||
// How many values have been read so far.
|
||||
|
||||
Reference in New Issue
Block a user