Skip to content

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

Merged
hauntsaninja merged 1 commit into
python:3.12from
miss-islington:backport-c8c162e-3.12
Jun 27, 2023
Merged

hauntsaninja merged 1 commit into
python:3.12from
miss-islington:backport-c8c162e-3.12

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor
  • 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 storchaka@gmail.com

…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 <storchaka@gmail.com>
@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

4 participants