maxNestingDepth constant

int const maxNestingDepth

The maximum depth of nested multipart structures that is parsed.

Deeper nested content is kept as an opaque part. Real messages rarely exceed a depth of ten, so this only stops maliciously crafted messages from consuming excessive stack and CPU time.

Implementation

static const int maxNestingDepth = 50;