diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-07 15:42:38 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-07 15:42:38 +0200 |
commit | fad85aadb0e168b7bde414694e448f34bb38c8ef (patch) | |
tree | f8fd61aa10789d9bda57c33d66ff4e60bd4d2794 /Modules/pyexpat.c | |
parent | 41a87637c0406d73425f79ba11aa43dbae9cfe0f (diff) | |
download | cpython-git-fad85aadb0e168b7bde414694e448f34bb38c8ef.tar.gz |
Issue #25558: Use compile-time asserts.
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 3 |
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: |