Fixed #4974 (CheckBufferOverrun::writeOutsideBufferSize() too strict)