Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix internal Wtf8Buf::extend_from_slice check #126977

Closed
Borgerr opened this issue Jun 26, 2024 · 2 comments · Fixed by #126980
Closed

Fix internal Wtf8Buf::extend_from_slice check #126977

Borgerr opened this issue Jun 26, 2024 · 2 comments · Fixed by #126980
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. O-windows Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@Borgerr
Copy link
Contributor

Borgerr commented Jun 26, 2024

Reviewing PR #126885 had some oversight regarding valid utf8 checks. This was graciously brought to our (meaning myself and @workingjubilee) attention by @yhx-12243 in this comment. Fix should really just be changing line 483 of wtf8.rs to setting self.is_known_utf8 to false, unless we decide there may be some merit to iterating again through the other buffer.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 26, 2024
@Borgerr
Copy link
Contributor Author

Borgerr commented Jun 26, 2024

@rustbot label T-libs C-cleanup O-windows

@rustbot rustbot added C-cleanup Category: PRs that clean code up or issues documenting cleanup. O-windows Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 26, 2024
@Borgerr
Copy link
Contributor Author

Borgerr commented Jun 26, 2024

@rustbot label -needs-triage

@rustbot rustbot removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 26, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 26, 2024
…=<try>

set self.is_known_utf8 to false in extend_from_slice

try-job: x86_64-msvc

closes rust-lang#126977
Related to rust-lang#126885, rust-lang#126333, and [this conversation](<rust-lang@aa46a33#r143539097>)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 26, 2024
… r=workingjubilee

set self.is_known_utf8 to false in extend_from_slice

try-job: x86_64-msvc

closes rust-lang#126977
Related to rust-lang#126885, rust-lang#126333, and [this conversation](<rust-lang@aa46a33#r143539097>)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 26, 2024
… r=workingjubilee

set self.is_known_utf8 to false in extend_from_slice

try-job: x86_64-msvc

closes rust-lang#126977
Related to rust-lang#126885, rust-lang#126333, and [this conversation](<rust-lang@aa46a33#r143539097>)
@bors bors closed this as completed in 8905be5 Jun 27, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 27, 2024
Rollup merge of rust-lang#126980 - Borgerr:fix-extendfromslice-check, r=workingjubilee

set self.is_known_utf8 to false in extend_from_slice

try-job: x86_64-msvc

closes rust-lang#126977
Related to rust-lang#126885, rust-lang#126333, and [this conversation](<rust-lang@aa46a33#r143539097>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. O-windows Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants