summaryrefslogtreecommitdiff
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r--Modules/pyexpat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 9a6da737fb..b45e3dac7e 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -747,7 +747,8 @@ pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
s += MAX_CHUNK_SIZE;
slen -= MAX_CHUNK_SIZE;
}
- assert(MAX_CHUNK_SIZE < INT_MAX && slen < INT_MAX);
+ Py_BUILD_ASSERT(MAX_CHUNK_SIZE <= INT_MAX);
+ assert(slen <= INT_MAX);
rc = XML_Parse(self->itself, s, (int)slen, isfinal);
done: