libkeepass 0.2.0
KeePass key database importer/exporter library
Loading...
Searching...
No Matches
limits.hh File Reference

Resource budgets enforced while importing (and parsing) databases. More...

#include <cstdint>

Go to the source code of this file.

Classes

struct  keepass::detail::ResourceLimits
 Configurable resource budgets for database import and XML parsing. More...
 

Detailed Description

Resource budgets enforced while importing (and parsing) databases.

Import is driven by untrusted length fields: a hostile or corrupt file can declare block sizes, binary sizes, entry counts or nesting depths that would otherwise make the importer loop or allocate unbounded amounts of memory. The importer enforces these budgets while it reads, rejecting the file with a FormatError as soon as a limit is exceeded.