SIGN IN SIGN UP

gh-140607: Validate returned byte count in RawIOBase.read (#140611)

While `RawIOBase.readinto` should return a count of bytes between 0 and
the length of the given buffer, it is not required to. Add validation
inside RawIOBase.read() that the returned byte count is valid.

Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
C
Cody Maloney committed
0f0a362768aecb4c791724cce486d8317533a94d
Parent: 313145e
Committed by GitHub <noreply@github.com> on 10/27/2025, 6:06:46 PM