Check for negative record list length

coverity_clang_test
elsid 2 years ago
parent 0688b6de40
commit 06f7e8088e
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -92,6 +92,9 @@ namespace Nif
{
const int length = nif->getInt();
if (length < 0)
throw std::runtime_error("Negative NIF record list length: " + std::to_string(length));
list.resize(static_cast<std::size_t>(length));
for (auto& value : list)

Loading…
Cancel
Save