]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117068: Remove useless code in bytesio.c:resize_buffer() (GH-117069)
authorNGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
Fri, 22 Mar 2024 11:25:38 +0000 (14:25 +0300)
committerGitHub <noreply@github.com>
Fri, 22 Mar 2024 11:25:38 +0000 (11:25 +0000)
Co-authored-by: i.khabibulin <i.khabibulin@ngrsoftlab.ru>
Modules/_io/bytesio.c

index 4a15c8e841f25fa923214f6bcca602a0b7847841..fb66d3db0f7a1f37411dca7b5b759d0564eeefd6 100644 (file)
@@ -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;