Skip to content

der: nested reader depth limit may reject the documented maximum depth of 64 #2392

Description

@dmulder

The nested-reader depth limiting added in der 0.8.1 appears to have a possible off-by-one discrepancy.

src/reader/position.rs uses a check equivalent to:

depth < MAX_DEPTH

with MAX_DEPTH set to 64. However, the accompanying comments or tests appear to describe 64 levels as the supported maximum. Depending on how the current depth is counted, the strict < comparison may reject the level described as the maximum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions