diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-07-15 02:15:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-15 02:15:14 (GMT) |
commit | 4f3edd6b535b6a0b7352df134c0f445ab279bfc0 (patch) | |
tree | 0acb4f0daa629ee9de7b92b847a4a7607541f709 /Misc | |
parent | 30f62748e99ef2af3bfbac0e2d84dccf48c81512 (diff) | |
download | cpython-4f3edd6b535b6a0b7352df134c0f445ab279bfc0.zip cpython-4f3edd6b535b6a0b7352df134c0f445ab279bfc0.tar.gz cpython-4f3edd6b535b6a0b7352df134c0f445ab279bfc0.tar.bz2 |
[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>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2023-06-02-19-37-29.gh-issue-105235.fgFGTi.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-06-02-19-37-29.gh-issue-105235.fgFGTi.rst b/Misc/NEWS.d/next/Core and Builtins/2023-06-02-19-37-29.gh-issue-105235.fgFGTi.rst new file mode 100644 index 0000000..c28d010 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2023-06-02-19-37-29.gh-issue-105235.fgFGTi.rst @@ -0,0 +1 @@ +Prevent out-of-bounds memory access during ``mmap.find()`` calls. |