changeset 87324:ef03369385ba

silence an overflow warning. slen is smaller than 1MB
author Christian Heimes <christian@cheimes.de>
date Fri, 22 Nov 2013 00:46:18 +0100
parents 0cfc5d0c9e77
children f0090ff52128 a0ec33b83ba4
files Modules/pyexpat.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Modules/pyexpat.c	Fri Nov 22 00:39:38 2013 +0100
+++ b/Modules/pyexpat.c	Fri Nov 22 00:46:18 2013 +0100
@@ -835,7 +835,8 @@
         s += MAX_CHUNK_SIZE;
         slen -= MAX_CHUNK_SIZE;
     }
-    rc = XML_Parse(self->itself, s, slen, isFinal);
+    assert(MAX_CHUNK_SIZE < INT_MAX && slen < INT_MAX);
+    rc = XML_Parse(self->itself, s, (int)slen, isFinal);
 
 done:
     if (view.buf != NULL)