Skip to content

Fix parsing error of the tag from buffered reader, when the first byte < is the last in the internal buffer of BufRead#940

Open
Mingun wants to merge 4 commits intotafia:masterfrom
Mingun:fix-939
Open

Fix parsing error of the tag from buffered reader, when the first byte < is the last in the internal buffer of BufRead#940
Mingun wants to merge 4 commits intotafia:masterfrom
Mingun:fix-939

Conversation

@Mingun
Copy link
Collaborator

@Mingun Mingun commented Feb 17, 2026

Fixes #939 which is regression from #936

…have `<` in input

Currently those methods are called when position points to `<` in XML source,
so test them in that environment
…kup methods

That is:
- read_bang_element
- read_element

In next commit buffered readers will require to skip the first byte because it will be consumed in peek_one
Slice reader does not require and cannot consume that byte
…e `<` is the last in the BufRead internal buffer
@Mingun Mingun added the bug label Feb 17, 2026
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.10345% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.00%. Comparing base (d1acdb5) to head (1ec47a0).
⚠️ Report is 46 commits behind head on master.

Files with missing lines Patch % Lines
src/reader/mod.rs 92.45% 4 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #940      +/-   ##
==========================================
- Coverage   58.08%   55.00%   -3.09%     
==========================================
  Files          42       44       +2     
  Lines       15513    16816    +1303     
==========================================
+ Hits         9011     9249     +238     
- Misses       6502     7567    +1065     
Flag Coverage Δ
unittests 55.00% <93.10%> (-3.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


/// Regression test for https://github.com/tafia/quick-xml/issues/939
#[test]
fn issue939() {
Copy link
Collaborator

@dralley dralley Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if these would have a short note on what was being tested, apart from the issue number. But given that's the current pattern for this file, this isn't a blocking request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UnclosedTag on validated XML file.

3 participants