There was an error while loading. Please reload this page.
1 parent 53c3b51 commit fb67d23Copy full SHA for fb67d23
1 file changed
Objects/bytearrayobject.c
@@ -237,6 +237,7 @@ bytearray_realign_data_lock_held(PyByteArrayObject *self, Py_ssize_t new_size, P
237
}
238
239
if (_PyBytes_ResizeKeepOnError(&self->ob_bytes_object, alloc) < 0) {
240
+ self->ob_start[size] = '\0'; /* Trailing null */
241
return -1;
242
243
0 commit comments