Skip to content

Commit e385958

Browse files
committed
fix comments
1 parent 64fcd75 commit e385958

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Modules/_json.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)