Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a8e3f7a8
Kaydet (Commit)
a8e3f7a8
authored
Nis 16, 2015
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update coverity modeling file to silence datetime warnings
üst
29fbd21d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
1 deletion
+57
-1
coverity_model.c
Misc/coverity_model.c
+57
-1
No files found.
Misc/coverity_model.c
Dosyayı görüntüle @
a8e3f7a8
...
...
@@ -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