Skip to content

Commit

Permalink
Merge pull request #34 from horacimacias/master
Browse files Browse the repository at this point in the history
minimal reproduceable for "String join would overflow memory bounds"
  • Loading branch information
sebastienrousseau authored Jan 1, 2025
2 parents c7ba7ac + 28d32a0 commit ab3c49e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/libyml/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,16 @@ impl Drop for ParserPinned<'_> {
unsafe { sys::yaml_parser_delete(&mut self.sys) }
}
}

#[cfg(test)]
mod tests {
use crate::{de::Progress, loader::Loader};

#[test]
fn can_load_document_with_16_spaces_value() {
let hardcoded = "t: a abc";
let progress = Progress::Str(hardcoded);
let mut loader = Loader::new(progress).unwrap();
let _document = loader.next_document().unwrap();
}
}

0 comments on commit ab3c49e

Please sign in to comment.