Skip to content

Commit

Permalink
adjust issue801 so that all angle brackets are read in different buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueGreenMagick committed Sep 20, 2024
1 parent 23a5161 commit 2731560
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,11 @@ fn issue776() {
}

/// Regression test for https://github.com/tafia/quick-xml/issues/801
/// Angle brackets are read in different buffer
#[test]
fn issue801() {
let xml = b"<!DOCTYPE X [<!-- --><!ENTITY a \"a\">]>";
let reader = BufReader::with_capacity(4, &xml[..]);
let xml = b"<!DOCTYPE X [<!-- --> <!ENTITY a \"a\">]>";
let reader = BufReader::with_capacity(2, &xml[..]);
let mut reader = Reader::from_reader(reader);
let mut buf = Vec::new();
loop {
Expand Down

0 comments on commit 2731560

Please sign in to comment.