@@ -1734,8 +1734,8 @@ _encoder_iterate_mapping_lock_held(PyEncoderObject *s, PyUnicodeWriter *writer,
17341734 for (Py_ssize_t i = 0 ; i < PyList_GET_SIZE (items ); i ++ ) {
17351735 PyObject * item = PyList_GET_ITEM (items , i );
17361736
1737- // GH-142831: The item must be strong-referenced to avoid UAF
1738- // if the user code modifies the list during iteration.
1737+ // GH-142831: The item must be strong-referenced to avoid
1738+ // use-after-free if the user code modifies the list during iteration.
17391739 Py_INCREF (item );
17401740
17411741 if (!PyTuple_Check (item ) || PyTuple_GET_SIZE (item ) != 2 ) {
@@ -1767,8 +1767,8 @@ _encoder_iterate_dict_lock_held(PyEncoderObject *s, PyUnicodeWriter *writer,
17671767 PyObject * key , * value ;
17681768 Py_ssize_t pos = 0 ;
17691769 while (PyDict_Next (dct , & pos , & key , & value )) {
1770- // GH-142831: The key and value must be strong-referenced to avoid UAF
1771- // if the user code modifies the dict during iteration.
1770+ // GH-142831: The key and value must be strong-referenced to avoid
1771+ // use-after-free if the user code modifies the dict during iteration.
17721772 Py_INCREF (key );
17731773 Py_INCREF (value );
17741774
@@ -1885,7 +1885,7 @@ _encoder_iterate_fast_seq_lock_held(PyEncoderObject *s, PyUnicodeWriter *writer,
18851885 for (Py_ssize_t i = 0 ; i < PySequence_Fast_GET_SIZE (s_fast ); i ++ ) {
18861886 PyObject * obj = PySequence_Fast_GET_ITEM (s_fast , i );
18871887
1888- // GH-142831: The object must be strong-referenced to avoid UAF
1888+ // GH-142831: The object must be strong-referenced to avoid use-after-free
18891889 // if the user code modifies the sequence during iteration.
18901890 Py_INCREF (obj );
18911891
0 commit comments