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
a994af64
Commit
a994af64
authored
Apr 16, 2015
by
Christian Heimes
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
65f79b59
8630749f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
1 deletion
+57
-1
Misc/coverity_model.c
Misc/coverity_model.c
+57
-1
No files found.
Misc/coverity_model.c
View file @
a994af64
...
...
@@ -122,7 +122,8 @@ static long r_long(RFILE *p)
/* Coverity doesn't understand that fdopendir() may take ownership of fd. */
DIR
*
fdopendir
(
int
fd
)
{
DIR
*
fdopendir
(
int
fd
)
{
DIR
*
d
;
if
(
d
)
{
__coverity_close__
(
fd
);
...
...
@@ -130,3 +131,58 @@ DIR *fdopendir(int fd) {
return
d
;
}
/* Modules/_datetime.c
*
* Coverity thinks that the input values for these function come from a
* tainted source PyDateTime_DATE_GET_* macros use bit shifting.
*/
static
PyObject
*
build_struct_time
(
int
y
,
int
m
,
int
d
,
int
hh
,
int
mm
,
int
ss
,
int
dstflag
)
{
PyObject
*
result
;
__coverity_tainted_data_sanitize__
(
y
);
__coverity_tainted_data_sanitize__
(
m
);
__coverity_tainted_data_sanitize__
(
d
);
__coverity_tainted_data_sanitize__
(
hh
);
__coverity_tainted_data_sanitize__
(
mm
);
__coverity_tainted_data_sanitize__
(
ss
);
__coverity_tainted_data_sanitize__
(
dstflag
);
return
result
;
}
static
int
ymd_to_ord
(
int
year
,
int
month
,
int
day
)
{
int
ord
=
0
;
__coverity_tainted_data_sanitize__
(
year
);
__coverity_tainted_data_sanitize__
(
month
);
__coverity_tainted_data_sanitize__
(
day
);
return
ord
;
}
static
int
normalize_date
(
int
*
year
,
int
*
month
,
int
*
day
)
{
__coverity_tainted_data_sanitize__
(
*
year
);
__coverity_tainted_data_sanitize__
(
*
month
);
__coverity_tainted_data_sanitize__
(
*
day
);
return
0
;
}
static
int
weekday
(
int
year
,
int
month
,
int
day
)
{
int
w
=
0
;
__coverity_tainted_data_sanitize__
(
year
);
__coverity_tainted_data_sanitize__
(
month
);
__coverity_tainted_data_sanitize__
(
day
);
return
w
;
}
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