gh-157710: Detect overflow in PyUnicodeWriter_Finish() #157715

Merged
vstinner opened 5:40pm on September 17, 2026 wanted to merge 91 Ξ” into python/cpython main from
unicode_overflow

Pull Request Overview

  • Opened on September 17, 2026
  • Status Merged
  • Commit count 1 with first commit September 18, 2026

Total Delta

91 Total Diff Delta

Open Days

Open 1 weekdays

Test Delta

20 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Data pending calculation for pull request

Author avatar

gh-157710: Detect overflow in PyUnicodeWriter_Finish()

Check if the trailing null character has been modified to detect buffer overflow in C extensions.

_PyUnicode_CheckConsistency() now always check if the trailing null character has been overridden to detect buffer overflow. Previously, it was only been checked if check_content parameter was non-zero.


  • Issue: gh-157710
    <!-- /gh-issue-number -->

PR was closed without comments.