summaryrefslogtreecommitdiff
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-07 15:42:38 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-07 15:42:38 +0200
commitfad85aadb0e168b7bde414694e448f34bb38c8ef (patch)
treef8fd61aa10789d9bda57c33d66ff4e60bd4d2794 /Modules/pyexpat.c
parent41a87637c0406d73425f79ba11aa43dbae9cfe0f (diff)
downloadcpython-git-fad85aadb0e168b7bde414694e448f34bb38c8ef.tar.gz
Issue #25558: Use compile-time asserts.
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: