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 panic in EscapeReader #18820

Merged
merged 2 commits into from
Feb 19, 2022
Merged

Conversation

zeripath
Copy link
Contributor

There is a potential panic due to a mistaken resetting of the length parameter when
multibyte characters go over a read boundary.

Signed-off-by: Andrew Thornton art27@cantab.net

There is a potential panic due to a mistaken resetting of the length parameter when
multibyte characters go over a read boundary.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.17.0 milestone Feb 19, 2022
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 19, 2022
Backport go-gitea#18820

There is a potential panic due to a mistaken resetting of the length parameter when
multibyte characters go over a read boundary.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label Feb 19, 2022
Copy link
Contributor

@singuliere singuliere left a comment

Choose a reason for hiding this comment

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

Good catch.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 19, 2022
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@931c2f4). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18820   +/-   ##
=======================================
  Coverage        ?   46.62%           
=======================================
  Files           ?      853           
  Lines           ?   122469           
  Branches        ?        0           
=======================================
  Hits            ?    57099           
  Misses          ?    58481           
  Partials        ?     6889           
Impacted Files Coverage Δ
modules/charset/escape.go 59.03% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 931c2f4...7fa8723. Read the comment docs.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 19, 2022
@zeripath zeripath merged commit 4b3ebda into go-gitea:main Feb 19, 2022
@zeripath zeripath deleted the fix-panic-in-escape-reader branch February 19, 2022 15:25
lunny pushed a commit that referenced this pull request Feb 19, 2022
Backport #18820

There is a potential panic due to a mistaken resetting of the length parameter when
multibyte characters go over a read boundary.

Signed-off-by: Andrew Thornton <art27@cantab.net>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 19, 2022
* giteaofficial/main:
  Fix panic in EscapeReader (go-gitea#18820)
  Put buttons back in org dashboard (go-gitea#18817)
  Generate coverage with sqlite. (go-gitea#18813)
  Update on-cloud-provider.md (go-gitea#18807)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
There is a potential panic due to a mistaken resetting of the length parameter when
multibyte characters go over a read boundary.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants