Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python/cpython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.14
Choose a base ref
...
head repository: iamsaugatpandey/cpython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: backport-44579b0-3.14
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 4 files changed
  • 2 contributors

Commits on Nov 11, 2026

  1. [3.14] gh-160708: Use the type size for resized ctypes simple objects (…

    …GH-160720)
    
    After ctypes.resize(), a simple object's buffer is larger than its
    type. bool() and passing the object to a foreign function still used
    the buffer size, so bool() read past a 16-byte string literal and the
    call copied the whole buffer into the fixed-size PyCArgObject value,
    corrupting the heap.
    
    Use the type's size instead, like the value getter does since
    gh-159739. bool() now checks the value's bytes directly, which also
    covers simple types larger than 16 bytes such as c_longdouble_complex
    on x86-64.
    (cherry picked from commit 44579b0)
    
    Co-authored-by: Saugat Pandey <[email protected]>
    Co-authored-by: Peter Bierma <[email protected]>
    iamsaugatpandey and ZeroIntensity committed Nov 11, 2026
    Configuration menu
    Copy the full SHA
    ec7d744 View commit details
    Browse the repository at this point in the history
Loading