SIGN IN SIGN UP

[3.12] gh-105235: Prevent reading outside buffer during mmap.find() (GH-105252) (#106708)

gh-105235: Prevent reading outside buffer during mmap.find() (GH-105252)

* Add a special case for s[-m:] == p in _PyBytes_Find

* Add tests for _PyBytes_Find

* Make sure that start <= end in mmap.find
(cherry picked from commit ab86426a3472ab68747815299d390b213793c3d1)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
M
Miss Islington (bot) committed
4f3edd6b535b6a0b7352df134c0f445ab279bfc0
Parent: 30f6274
Committed by GitHub <noreply@github.com> on 7/15/2023, 2:15:14 AM