From: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:25:38 +0000 (+0300) Subject: gh-117068: Remove useless code in bytesio.c:resize_buffer() (GH-117069) X-Git-Tag: v3.13.0a6~185 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63d6f2623ef2aa90f51c6a928b96845b9b380d89;p=thirdparty%2FPython%2Fcpython.git gh-117068: Remove useless code in bytesio.c:resize_buffer() (GH-117069) Co-authored-by: i.khabibulin --- diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c index 4a15c8e841f2..fb66d3db0f7a 100644 --- a/Modules/_io/bytesio.c +++ b/Modules/_io/bytesio.c @@ -155,9 +155,6 @@ resize_buffer(bytesio *self, size_t size) alloc = size + 1; } - if (alloc > ((size_t)-1) / sizeof(char)) - goto overflow; - if (SHARED_BUF(self)) { if (unshare_buffer(self, alloc) < 0) return -1;