This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Modules/_json.c: Missing NULL checks in _encoded_const()
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, berker.peksag, izbyshev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-09-12 20:42 by izbyshev, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9225 merged izbyshev, 2018-09-12 20:45
PR 9230 merged miss-islington, 2018-09-12 21:05
PR 9231 merged miss-islington, 2018-09-12 21:05
PR 9232 merged miss-islington, 2018-09-12 21:05
Messages (6)
msg325177 - (view) Author: Alexey Izbyshev (izbyshev) * (Python triager) Date: 2018-09-12 20:42
The return value of PyUnicode_InternFromString() is not checked for NULL and then dereferenced at three places in https://github.com/python/cpython/blob/0bd1a2dcfdf36b181385ae61361e7692f4ebb0fd/Modules/_json.c#L1369

Reported by Svace static analyzer.
msg325182 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-09-12 21:05
New changeset 6f82bffd2df63a4072b3f0483cdbe93ddedb87e9 by Berker Peksag (Alexey Izbyshev) in branch 'master':
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
https://github.com/python/cpython/commit/6f82bffd2df63a4072b3f0483cdbe93ddedb87e9
msg325186 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-09-12 21:46
New changeset ec4d099b9f1951b08d1a53181c278173ff6a0cc1 by Berker Peksag (Miss Islington (bot)) in branch '3.7':
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
https://github.com/python/cpython/commit/ec4d099b9f1951b08d1a53181c278173ff6a0cc1
msg325190 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-09-12 22:00
New changeset 6d726868cd1743623a28b8e048e31b9c3c52a399 by Berker Peksag (Miss Islington (bot)) in branch '3.6':
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
https://github.com/python/cpython/commit/6d726868cd1743623a28b8e048e31b9c3c52a399
msg325191 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-09-12 22:00
New changeset 669429fb583031c7c87392e30b065e99a2d8ccda by Berker Peksag (Miss Islington (bot)) in branch '2.7':
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
https://github.com/python/cpython/commit/669429fb583031c7c87392e30b065e99a2d8ccda
msg325193 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-09-12 22:01
Thanks, Alexey!
History
Date User Action Args
2022-04-11 14:59:05adminsetgithub: 78830
2018-09-12 22:01:37berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg325193

stage: patch review -> resolved
2018-09-12 22:00:59berker.peksagsetmessages: + msg325191
2018-09-12 22:00:14berker.peksagsetmessages: + msg325190
2018-09-12 21:46:44berker.peksagsetmessages: + msg325186
2018-09-12 21:05:52miss-islingtonsetpull_requests: + pull_request8663
2018-09-12 21:05:41miss-islingtonsetpull_requests: + pull_request8662
2018-09-12 21:05:33miss-islingtonsetpull_requests: + pull_request8661
2018-09-12 21:05:23berker.peksagsetmessages: + msg325182
2018-09-12 20:45:31izbyshevsetkeywords: + patch
stage: patch review
pull_requests: + pull_request8656
2018-09-12 20:42:59izbyshevcreate