Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 30, 2020

  • bpo-41524: fix pointer bug in PyOS_mystr{n}icmp

The existing implementations of PyOS_mystrnicmp and PyOS_mystricmp
can increment pointers beyond the end of a string.

This commit fixes those cases by moving the mutation out of the condition.

  • 📜🤖 Added by blurb_it.

  • Address comments

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 97eaf2b)

Co-authored-by: wmeehan wmeehan@users.noreply.github.com

https://bugs.python.org/issue41524

Automerge-Triggered-By: @corona10

* bpo-41524: fix pointer bug in PyOS_mystr{n}icmp

The existing implementations of PyOS_mystrnicmp and PyOS_mystricmp
can increment pointers beyond the end of a string.

This commit fixes those cases by moving the mutation out of the condition.

* 📜🤖 Added by blurb_it.

* Address comments

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 97eaf2b)

Co-authored-by: wmeehan <wmeehan@users.noreply.github.com>
@corona10 corona10 merged commit 85ca9c0 into python:3.8 Aug 30, 2020
@miss-islington miss-islington deleted the backport-97eaf2b-3.8 branch August 30, 2020 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants