summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2023-10-16 20:41:01 (GMT)
committerGitHub <noreply@github.com>2023-10-16 20:41:01 (GMT)
commitf46333b9f50c79abf650998664e07b3ffbb6130a (patch)
tree91f2aebb537abf71eae3c1a731839f67e2deee1d /Parser
parenta77180e6633a3aca4011b175c2ac65aa33795035 (diff)
downloadcpython-f46333b9f50c79abf650998664e07b3ffbb6130a.zip
cpython-f46333b9f50c79abf650998664e07b3ffbb6130a.tar.gz
cpython-f46333b9f50c79abf650998664e07b3ffbb6130a.tar.bz2
gh-107450: Remove unnecessary overflow check in parser error handler (#110940)
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pegen_errors.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/Parser/pegen_errors.c b/Parser/pegen_errors.c
index 057bf55..e2bc3b9 100644
--- a/Parser/pegen_errors.c
+++ b/Parser/pegen_errors.c
@@ -240,12 +240,6 @@ _PyPegen_raise_error(Parser *p, PyObject *errtype, int use_mark, const char *err
col_offset = 0;
} else {
const char* start = p->tok->buf ? p->tok->line_start : p->tok->buf;
- if (p->tok->cur - start > INT_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "Parser column offset overflow - source line is too big");
- p->error_indicator = 1;
- return NULL;
- }
col_offset = Py_SAFE_DOWNCAST(p->tok->cur - start, intptr_t, int);
}
} else {