Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Stack overflow when parsing very a deeply nested array into a toml::Value #428

Closed
5225225 opened this issue May 2, 2021 · 1 comment
Closed

Comments

@5225225
Copy link

5225225 commented May 2, 2021

Reproduction program:

fn main() {
    let brackets = "[".repeat(20000);
    let input_string = format!("x={}", &brackets);
    let _: Result<toml::Value, _> = toml::from_str(&input_string);
}

I don't know what the most reasonable way to handle this case is, throw an error at some level of recursion depth and call the input invalid?

@epage
Copy link
Member

epage commented Sep 23, 2022

Maintenance of this crate has moved to the https://github.com/toml-rs/toml repo. As a heads up, we plan to move toml to be on top of toml_edit, see toml-rs/toml#340.

Closing this out. If this is still a problem, feel free to recreate this issue in the new repo.

@epage epage closed this as completed Sep 23, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants