diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2020-06-16 15:49:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 15:49:43 (GMT) |
commit | 51c5896b6205911d29ac07f167ec7f3cf1cb600d (patch) | |
tree | 4bb679cf3dd91e96b6abf60f4d139e1e943f5ed0 /Parser/pegen.h | |
parent | fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1 (diff) | |
download | cpython-51c5896b6205911d29ac07f167ec7f3cf1cb600d.zip cpython-51c5896b6205911d29ac07f167ec7f3cf1cb600d.tar.gz cpython-51c5896b6205911d29ac07f167ec7f3cf1cb600d.tar.bz2 |
bpo-40958: Avoid buffer overflow in the parser when indexing the current line (GH-20875)
Diffstat (limited to 'Parser/pegen.h')
-rw-r--r-- | Parser/pegen.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/pegen.h b/Parser/pegen.h index 64cf0ec..c4ff8c9 100644 --- a/Parser/pegen.h +++ b/Parser/pegen.h @@ -34,7 +34,7 @@ typedef struct _memo { typedef struct { int type; PyObject *bytes; - int lineno, col_offset, end_lineno, end_col_offset; + Py_ssize_t lineno, col_offset, end_lineno, end_col_offset; Memo *memo; } Token; @@ -132,7 +132,7 @@ void *_PyPegen_string_token(Parser *p); const char *_PyPegen_get_expr_name(expr_ty); void *_PyPegen_raise_error(Parser *p, PyObject *errtype, const char *errmsg, ...); void *_PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, - int lineno, int col_offset, + Py_ssize_t lineno, Py_ssize_t col_offset, const char *errmsg, va_list va); void *_PyPegen_dummy_name(Parser *p, ...); |