gh-144475: Fix a heap buffer overflow in partial_repr#145362
Conversation
aisk
left a comment
There was a problem hiding this comment.
Sorry, the approval is by accidant. I don't mean to approve this, just have comments this.
Sorry, something went wrong.
b498bbe to
7b4955f
Compare
February 28, 2026 17:42
encukou
left a comment
There was a problem hiding this comment.
I am not exactly sure what happened in #144571 so I would appreciate if anyone could tell me so I don't make the same mistake again.
Looks like a bad git rebase.
You don't need rebase in CPython, since the PRs are squashed.
Sorry, something went wrong.
671a953
into
python:main
Mar 3, 2026
|
Thanks @bkap123 for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, something went wrong.
|
Sorry, @bkap123 and @encukou, I could not cleanly backport this to |
Sorry, something went wrong.
…honGH-145362) (cherry picked from commit 671a953) Co-authored-by: bkap123 <97006829+bkap123@users.noreply.github.com>
This is a cleaner version of PR #144571. I am not exactly sure what happened in #144571 so I would appreciate if anyone could tell me so I don't make the same mistake again.
Here are the changes I made:
argsandkwlocal pointer so that both live long enough during the call toreprto prevent a segfaultfnlocal pointer so thatrepruses its original state when generating its final representation.errorgoto and merged it with thedonegoto as I needed to decrement the reference count offn,args, andkw, and I found that decrementing them in thedonegoto was the easiest.fnandkwarguments.