Staging
v0.5.1
https://github.com/python/cpython
Revision 79c6b602efc9a906c8496f3d5f4d54c54b48fa06 authored by Miss Islington (bot) on 15 July 2020, 12:35:08 UTC, committed by GitHub on 15 July 2020, 12:35:08 UTC
Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).
(cherry picked from commit 5a8d121a1f3ef5ad7c105ee378cc79a3eac0c7d4)

Co-authored-by: Rishi <rishi_devan@mail.com>
1 parent 620e276
Raw File
Tip revision: 79c6b602efc9a906c8496f3d5f4d54c54b48fa06 authored by Miss Islington (bot) on 15 July 2020, 12:35:08 UTC
bpo-39017: Avoid infinite loop in the tarfile module (GH-21454) (GH-21484)
Tip revision: 79c6b60
iterobject.h
#ifndef Py_ITEROBJECT_H
#define Py_ITEROBJECT_H
/* Iterators (the basic kind, over a sequence) */
#ifdef __cplusplus
extern "C" {
#endif

PyAPI_DATA(PyTypeObject) PySeqIter_Type;
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
PyAPI_DATA(PyTypeObject) PyCmpWrapper_Type;

#define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)

PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *);


#define PyCallIter_Check(op) (Py_TYPE(op) == &PyCallIter_Type)

PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *);

#ifdef __cplusplus
}
#endif
#endif /* !Py_ITEROBJECT_H */

back to top