Skip to content

Segmentation fault (stack overflow) due to unbounded recursion #1419

Closed
@guidovranken

Description

The following causes a segmentation fault (stack overflow) due to an apparent unbounded recursion.

#include <string>
#include "json.hpp"
int main(void)
{
    const std::string s(512000, '[');
    try {
        auto j = nlohmann::json::parse(s);
    } catch ( ... )  { } ;

    return 0;
}

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions