Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6f82bffd
Commit
6f82bffd
authored
Sep 13, 2018
by
Alexey Izbyshev
Committed by
Berker Peksag
Sep 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
Reported by Svace static analyzer.
parent
0dd71807
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Modules/_json.c
Modules/_json.c
+3
-3
No files found.
Modules/_json.c
View file @
6f82bffd
...
...
@@ -1374,7 +1374,7 @@ _encoded_const(PyObject *obj)
if
(
s_null
==
NULL
)
{
s_null
=
PyUnicode_InternFromString
(
"null"
);
}
Py_INCREF
(
s_null
);
Py_
X
INCREF
(
s_null
);
return
s_null
;
}
else
if
(
obj
==
Py_True
)
{
...
...
@@ -1382,7 +1382,7 @@ _encoded_const(PyObject *obj)
if
(
s_true
==
NULL
)
{
s_true
=
PyUnicode_InternFromString
(
"true"
);
}
Py_INCREF
(
s_true
);
Py_
X
INCREF
(
s_true
);
return
s_true
;
}
else
if
(
obj
==
Py_False
)
{
...
...
@@ -1390,7 +1390,7 @@ _encoded_const(PyObject *obj)
if
(
s_false
==
NULL
)
{
s_false
=
PyUnicode_InternFromString
(
"false"
);
}
Py_INCREF
(
s_false
);
Py_
X
INCREF
(
s_false
);
return
s_false
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment