| 233 | } |
| 234 | |
| 235 | static std::string deserialiseString(Stream& stream) |
| 236 | { |
| 237 | std::string result; |
| 238 | const auto size = stream.readValue<uint32_t>(); |
| 239 | if (size > kMaxStringLength) // Arbitrary max length to prevent issues of massive allocation on bad data |
| 240 | { |
| 241 | return result; |
| 242 | } |
| 243 | result.resize(size); |
| 244 | stream.read(result.data(), result.size()); |
| 245 | return result; |
| 246 | } |
| 247 | |
| 248 | static ObjectIndexEntry deserialiseEntry(Stream& stream) |
| 249 | { |
no test coverage detected