Skip to content

[3.12] gh-106030: Miscellaneous fixes in Python/suggestions.c (GH-106031) #106036

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

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 23, 2023

  • PyDict_GetItem() and PyObject_HasAttr() suppress arbitrary errors and
    should not be used.
  • PyUnicode_CompareWithASCIIString() only works if the second argument
    is ASCII string.
  • Refleak in get_suggestions_for_name_error.
  • Use of borrowed pointer after possible freeing (self).
  • Add some missing error checks.
    (cherry picked from commit c8c162e)

Co-authored-by: Serhiy Storchaka [email protected]

…H-106031)

* PyDict_GetItem() and PyObject_HasAttr() suppress arbitrary errors and
  should not be used.
* PyUnicode_CompareWithASCIIString() only works if the second argument
  is ASCII string.
* Refleak in get_suggestions_for_name_error.
* Use of borrowed pointer after possible freeing (self).
* Add some missing error checks.
(cherry picked from commit c8c162e)

Co-authored-by: Serhiy Storchaka <[email protected]>
@hauntsaninja hauntsaninja merged commit 1bb2bf7 into python:3.12 Jun 27, 2023
@miss-islington miss-islington deleted the backport-c8c162e-3.12 branch June 27, 2023 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants