]> granicus.if.org Git - python/commitdiff
bpo-30911: Fix a crash in json on platforms with unsigned char (#2684)
authorSegev Finer <segev208@gmail.com>
Thu, 13 Jul 2017 05:52:08 +0000 (08:52 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 13 Jul 2017 05:52:08 +0000 (08:52 +0300)
when pass bad strict argument.

Modules/_json.c

index f574004b38e002a7029251eb54e44caa63892b95..07bcd318b1eb7f8c06534fced85b2ae303d59651 100644 (file)
@@ -18,7 +18,7 @@ static PyTypeObject PyEncoderType;
 
 typedef struct _PyScannerObject {
     PyObject_HEAD
-    char strict;
+    signed char strict;
     PyObject *object_hook;
     PyObject *object_pairs_hook;
     PyObject *parse_float;