]> granicus.if.org Git - python/commitdiff
Fix signed / unsigned comparison
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 23 Nov 2013 20:34:04 +0000 (21:34 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 23 Nov 2013 20:34:04 +0000 (21:34 +0100)
Modules/_pickle.c

index 11e07b3902060c2b43423e56ff022449b72408dc..22ce7a504009aaed21c3fbead7520289715d8dbe 100644 (file)
@@ -1165,7 +1165,7 @@ _Unpickler_Read(UnpicklerObject *self, char **s, Py_ssize_t n)
             PyErr_Format(UnpicklingError, "Invalid frame length");
             return -1;
         }
-        if (frame_len < n) {
+        if ((Py_ssize_t) frame_len < n) {
             PyErr_Format(UnpicklingError, "Bad framing");
             return -1;
         }