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
83d1266c
Kaydet (Commit)
83d1266c
authored
Mar 02, 2006
tarafından
Thomas Wouters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Properly fix Py_SAFE_DOWNCAST-triggerd bugs.
üst
369092be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
_hashopenssl.c
Modules/_hashopenssl.c
+10
-7
No files found.
Modules/_hashopenssl.c
Dosyayı görüntüle @
83d1266c
...
...
@@ -173,7 +173,8 @@ EVP_update(EVPobject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"s#:update"
,
&
cp
,
&
len
))
return
NULL
;
EVP_DigestUpdate
(
&
self
->
ctx
,
cp
,
(
unsigned
int
)
len
);
EVP_DigestUpdate
(
&
self
->
ctx
,
cp
,
Py_SAFE_DOWNCAST
(
len
,
Py_ssize_t
,
unsigned
int
));
Py_INCREF
(
Py_None
);
return
Py_None
;
...
...
@@ -240,7 +241,7 @@ EVP_tp_init(EVPobject *self, PyObject *args, PyObject *kwds)
PyObject
*
name_obj
=
NULL
;
char
*
nameStr
;
unsigned
char
*
cp
=
NULL
;
Py_ssize_t
len
;
Py_ssize_t
len
=
0
;
const
EVP_MD
*
digest
;
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwds
,
"O|s#:HASH"
,
kwlist
,
...
...
@@ -264,7 +265,8 @@ EVP_tp_init(EVPobject *self, PyObject *args, PyObject *kwds)
Py_INCREF
(
self
->
name
);
if
(
cp
&&
len
)
EVP_DigestUpdate
(
&
self
->
ctx
,
cp
,
(
unsigned
int
)
len
);
EVP_DigestUpdate
(
&
self
->
ctx
,
cp
,
Py_SAFE_DOWNCAST
(
len
,
Py_ssize_t
,
unsigned
int
));
return
0
;
}
...
...
@@ -377,7 +379,7 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
char
*
name
;
const
EVP_MD
*
digest
;
unsigned
char
*
cp
=
NULL
;
Py_ssize_t
len
;
Py_ssize_t
len
=
0
;
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwdict
,
"O|s#:new"
,
kwlist
,
&
name_obj
,
&
cp
,
&
len
))
{
...
...
@@ -391,7 +393,8 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
digest
=
EVP_get_digestbyname
(
name
);
return
EVPnew
(
name_obj
,
digest
,
NULL
,
cp
,
(
unsigned
int
)
len
);
return
EVPnew
(
name_obj
,
digest
,
NULL
,
cp
,
Py_SAFE_DOWNCAST
(
len
,
Py_ssize_t
,
unsigned
int
));
}
/*
...
...
@@ -406,7 +409,7 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
EVP_new_ ## NAME (PyObject *self, PyObject *args) \
{ \
unsigned char *cp = NULL; \
Py_ssize_t len; \
Py_ssize_t len
= 0
; \
\
if (!PyArg_ParseTuple(args, "|s#:" #NAME , &cp, &len)) { \
return NULL; \
...
...
@@ -416,7 +419,7 @@ EVP_new(PyObject *self, PyObject *args, PyObject *kwdict)
CONST_ ## NAME ## _name_obj, \
NULL, \
CONST_new_ ## NAME ## _ctx_p, \
cp,
(unsigned int)len
); \
cp,
Py_SAFE_DOWNCAST(len, Py_ssize_t, unsigned int)
); \
}
/* a PyMethodDef structure for the constructor */
...
...
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