]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove dead stores to 'size' in UTF-8 decoder (unicodeobject.c) (#140637)
authorShamil <ashm.tech@proton.me>
Mon, 27 Oct 2025 08:55:57 +0000 (11:55 +0300)
committerGitHub <noreply@github.com>
Mon, 27 Oct 2025 08:55:57 +0000 (11:55 +0300)
Objects/unicodeobject.c

index d4549b70d4dabc6e56d95ddf8a06c167c3cf63be..f60f7dd2d13604992ee9378db8e6b47093b276ca 100644 (file)
@@ -5409,7 +5409,6 @@ unicode_decode_utf8(const char *s, Py_ssize_t size,
     if (maxchr <= 255) {
         memcpy(PyUnicode_1BYTE_DATA(u), s, pos);
         s += pos;
-        size -= pos;
         writer.pos = pos;
     }
 
@@ -5457,7 +5456,6 @@ unicode_decode_utf8_writer(_PyUnicodeWriter *writer,
             return 0;
         }
         s += decoded;
-        size -= decoded;
     }
 
     return unicode_decode_utf8_impl(writer, starts, s, end,