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
8404749e
Kaydet (Commit)
8404749e
authored
Mar 03, 2009
tarafından
Hirokazu Yamamoto
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed memory leak on failure. This is related to issue5403 but won't crash on py3k.
üst
45ed72dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
8 deletions
+38
-8
md5module.c
Modules/md5module.c
+7
-2
sha1module.c
Modules/sha1module.c
+7
-2
sha256module.c
Modules/sha256module.c
+12
-2
sha512module.c
Modules/sha512module.c
+12
-2
No files found.
Modules/md5module.c
Dosyayı görüntüle @
8404749e
...
...
@@ -526,18 +526,23 @@ MD5_new(PyObject *self, PyObject *args, PyObject *kwdict)
if
(
data_obj
)
GET_BUFFER_VIEW_OR_ERROUT
(
data_obj
,
&
buf
);
if
((
new
=
newMD5object
())
==
NULL
)
if
((
new
=
newMD5object
())
==
NULL
)
{
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
md5_init
(
&
new
->
hash_state
);
if
(
PyErr_Occurred
())
{
Py_DECREF
(
new
);
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
if
(
data_obj
)
{
md5_process
(
&
new
->
hash_state
,
buf
.
buf
,
buf
.
len
);
PyBuffer_Release
(
&
buf
);
PyBuffer_Release
(
&
buf
);
}
return
(
PyObject
*
)
new
;
...
...
Modules/sha1module.c
Dosyayı görüntüle @
8404749e
...
...
@@ -502,18 +502,23 @@ SHA1_new(PyObject *self, PyObject *args, PyObject *kwdict)
if
(
data_obj
)
GET_BUFFER_VIEW_OR_ERROUT
(
data_obj
,
&
buf
);
if
((
new
=
newSHA1object
())
==
NULL
)
if
((
new
=
newSHA1object
())
==
NULL
)
{
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
sha1_init
(
&
new
->
hash_state
);
if
(
PyErr_Occurred
())
{
Py_DECREF
(
new
);
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
if
(
data_obj
)
{
sha1_process
(
&
new
->
hash_state
,
buf
.
buf
,
buf
.
len
);
PyBuffer_Release
(
&
buf
);
PyBuffer_Release
(
&
buf
);
}
return
(
PyObject
*
)
new
;
...
...
Modules/sha256module.c
Dosyayı görüntüle @
8404749e
...
...
@@ -629,13 +629,18 @@ SHA256_new(PyObject *self, PyObject *args, PyObject *kwdict)
if
(
data_obj
)
GET_BUFFER_VIEW_OR_ERROUT
(
data_obj
,
&
buf
);
if
((
new
=
newSHA256object
())
==
NULL
)
if
((
new
=
newSHA256object
())
==
NULL
)
{
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
sha_init
(
new
);
if
(
PyErr_Occurred
())
{
Py_DECREF
(
new
);
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
if
(
data_obj
)
{
...
...
@@ -665,13 +670,18 @@ SHA224_new(PyObject *self, PyObject *args, PyObject *kwdict)
if
(
data_obj
)
GET_BUFFER_VIEW_OR_ERROUT
(
data_obj
,
&
buf
);
if
((
new
=
newSHA224object
())
==
NULL
)
if
((
new
=
newSHA224object
())
==
NULL
)
{
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
sha224_init
(
new
);
if
(
PyErr_Occurred
())
{
Py_DECREF
(
new
);
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
if
(
data_obj
)
{
...
...
Modules/sha512module.c
Dosyayı görüntüle @
8404749e
...
...
@@ -695,13 +695,18 @@ SHA512_new(PyObject *self, PyObject *args, PyObject *kwdict)
if
(
data_obj
)
GET_BUFFER_VIEW_OR_ERROUT
(
data_obj
,
&
buf
);
if
((
new
=
newSHA512object
())
==
NULL
)
if
((
new
=
newSHA512object
())
==
NULL
)
{
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
sha512_init
(
new
);
if
(
PyErr_Occurred
())
{
Py_DECREF
(
new
);
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
if
(
data_obj
)
{
...
...
@@ -731,13 +736,18 @@ SHA384_new(PyObject *self, PyObject *args, PyObject *kwdict)
if
(
data_obj
)
GET_BUFFER_VIEW_OR_ERROUT
(
data_obj
,
&
buf
);
if
((
new
=
newSHA384object
())
==
NULL
)
if
((
new
=
newSHA384object
())
==
NULL
)
{
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
sha384_init
(
new
);
if
(
PyErr_Occurred
())
{
Py_DECREF
(
new
);
if
(
data_obj
)
PyBuffer_Release
(
&
buf
);
return
NULL
;
}
if
(
data_obj
)
{
...
...
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