gh-149816: add missing critical section on self in buffered_iternext (#150295)

This commit is contained in:
Kumar Aditya
2026-05-23 14:27:13 +05:30
committed by GitHub
parent 1b20d1933f
commit e8545ed3ea
+2
View File
@@ -1509,7 +1509,9 @@ buffered_iternext(PyObject *op)
tp == state->PyBufferedRandom_Type)
{
/* Skip method call overhead for speed */
Py_BEGIN_CRITICAL_SECTION(self);
line = _buffered_readline(self, -1);
Py_END_CRITICAL_SECTION();
}
else {
line = PyObject_CallMethodNoArgs((PyObject *)self,