Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka 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.

* 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.
@AlexWaygoodAlexWaygood changed the title gh-106030: Miscaleous fixes in Python/suggestions.cgh-106030: Miscellaneous fixes in Python/suggestions.cJun 23, 2023
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchakaserhiy-storchaka deleted the suggestions branch June 23, 2023 16:53
@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker c8c162ef5294cddb7ac75fe93ab918e5661c68ee 3.11

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 23, 2023
…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>
@bedevere-bot
Copy link

GH-106036 is a backport of this pull request to the 3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12 only security fixes label Jun 23, 2023
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 23, 2023
…ythonGH-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>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 23, 2023
…ythonGH-106031) * PyUnicode_CompareWithASCIIString() only works if the second argument is ASCII string. * Refleak in get_suggestions_for_name_error. * Add some missing error checks.. (cherry picked from commit c8c162e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-106039 is a backport of this pull request to the 3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11 only security fixes label Jun 23, 2023
hauntsaninja pushed a commit that referenced this pull request Jun 27, 2023
) (#106036) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchakaserhiy-storchaka removed their assignment Jul 25, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@serhiy-storchaka@miss-islington@bedevere-bot@pablogsal