42 Commits

Author SHA1 Message Date
Serhiy Storchaka
5d7a18f3b6 [2.7] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1471)
It was possible to get a core dump by using uninitialized
_json objects. Now __new__ methods create initialized objects.
__init__ methods are removed..
(cherry picked from commit 76a3e51a40)
2017-05-05 11:21:45 +03:00
Serhiy Storchaka
f04790a4b7 Fixed possible reference leaks in the _json module. 2017-01-03 11:17:53 +02:00
Benjamin Peterson
aa0342091f be extremely careful about overflows in encode_basestring_ascii (closes #28284) 2016-09-26 23:55:41 -07:00
Mark Dickinson
e6239a3ab3 Issue #27934: Use float.__repr__ instead of plain repr when JSON-encoding an instance of a float subclass. Thanks Eddie James. 2016-09-03 17:45:00 +01:00
Benjamin Peterson
04a5385353 fix possible overflow in encode_basestring_ascii (#23369) 2016-08-13 16:47:25 -07:00
Serhiy Storchaka
763a61ca95 Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka
bc62af1bbe Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:51:18 +03:00
Serhiy Storchaka
5951f2300f Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
2015-12-24 10:35:35 +02:00
Serhiy Storchaka
76a64ca438 Issue #24683: Fixed a crash in _json.make_encoder() called with non-dict 1st argument. 2015-07-26 09:07:53 +03:00
Serhiy Storchaka
045c451ff4 Issue #24704: Fixed possible NULL pointer dereferencing in the _json module
initialization.  Patch by Pankaj Sharma.
2015-07-24 12:58:25 +03:00
Serhiy Storchaka
5127ed727c Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
2015-05-30 17:45:12 +03:00
Benjamin Peterson
3e5d87bb86 disallow a negative idx parameter 2014-04-14 11:43:09 -04:00
Benjamin Peterson
6c939cb6f6 in scan_once, prevent the reading of arbitrary memory when passed a negative index
Bug reported by Guido Vranken.
2014-04-13 22:10:38 -04:00
Serhiy Storchaka
dafda9b042 Issue #11489: JSON decoder now accepts lone surrogates. 2013-11-26 21:25:15 +02:00
Antoine Pitrou
e9e35c3f6b Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded.
Patch by Serhiy Storchaka.
2012-11-01 20:07:40 +01:00
Antoine Pitrou
d9a5137742 Issue #5067: improve some json error messages.
Patch by Serhiy Storchaka.
2012-06-29 01:58:26 +02:00
Amaury Forgeot d'Arc
dee76e627d Issue #13774: json: Fix a SystemError when a bogus encoding is passed to
json.loads().
2012-01-13 22:53:25 +01:00
Ezio Melotti
c1ec7b5d44 #12051: Fix segfault in json.dumps() while encoding highly-nested objects using the C accelerations. 2011-05-11 00:55:35 +03:00
Ezio Melotti
cec464951e #12017: Fix segfault in json.loads() while decoding highly-nested objects using the C accelerations. 2011-05-07 17:40:23 +03:00
Ezio Melotti
f5164f6e93 #11982: remove now unused function. 2011-05-04 15:28:31 +03:00
Ezio Melotti
df8a8f768d #11982: fix json.loads('""') to return u'' rather than ''. 2011-05-04 14:40:53 +03:00
Georg Brandl
d823bdcb0e #10804: fix copy-paste error when checking assigned fields for NULL. 2011-01-02 14:20:16 +00:00
Barry Warsaw
fa6582752a Issue 10038. Restore the Python 2.6 behavior that json.loads() always returns
unicode.  Patch by Patch by Walter Dörwald.
2010-11-02 21:03:09 +00:00
Raymond Hettinger
cbba8d4c7a Backport r72961 fixing issue #6105: json.dumps not following OrderedDict iteration order. 2010-10-30 07:29:44 +00:00
Antoine Pitrou
22ad24528e Merged revisions 85342 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85342 | antoine.pitrou | 2010-10-09 17:24:28 +0200 (sam., 09 oct. 2010) | 4 lines

  Issue #10055: Make json C89-compliant in UCS4 mode.
........
2010-10-09 15:28:59 +00:00