• Victor Stinner's avatar
    Close #19568: Fix bytearray_setslice_linear(), fix handling of · 8455723c
    Victor Stinner yazdı
    PyByteArray_Resize() failure: leave the bytearray object in an consistent state.
    
    If growth < 0, handling the memory allocation failure is tricky here because
    the bytearray object has already been modified.  If lo != 0, the operation is
    completed, but a MemoryError is still raised and the memory block is not
    shrinked. If lo == 0, the bytearray is restored in its previous state and a
    MemoryError is raised.
    8455723c
bytearrayobject.c 89.1 KB