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
cd8799f0
Kaydet (Commit)
cd8799f0
authored
May 23, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #14888: Fix misbehaviour of the _md5 module when called on data larger than 2**32 bytes.
üst
d68ffdb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
NEWS
Misc/NEWS
+3
-0
md5module.c
Modules/md5module.c
+14
-3
No files found.
Misc/NEWS
Dosyayı görüntüle @
cd8799f0
...
...
@@ -64,6 +64,9 @@ Core and Builtins
Library
-------
- Issue #14888: Fix misbehaviour of the _md5 module when called on data
larger than 2**32 bytes.
- Issue #14875: Use float('inf') instead of float('1e66666') in the json module.
- Issue #14572: Prevent build failures with pre-3.5.0 versions of
...
...
Modules/md5module.c
Dosyayı görüntüle @
cd8799f0
...
...
@@ -262,6 +262,8 @@ MD5_new(PyObject *self, PyObject *args)
{
md5object
*
md5p
;
Py_buffer
view
=
{
0
};
Py_ssize_t
n
;
unsigned
char
*
buf
;
if
(
!
PyArg_ParseTuple
(
args
,
"|s*:new"
,
&
view
))
return
NULL
;
...
...
@@ -271,9 +273,18 @@ MD5_new(PyObject *self, PyObject *args)
return
NULL
;
}
if
(
view
.
len
>
0
)
{
md5_append
(
&
md5p
->
md5
,
(
unsigned
char
*
)
view
.
buf
,
Py_SAFE_DOWNCAST
(
view
.
len
,
Py_ssize_t
,
unsigned
int
));
n
=
view
.
len
;
buf
=
(
unsigned
char
*
)
view
.
buf
;
while
(
n
>
0
)
{
Py_ssize_t
nbytes
;
if
(
n
>
INT_MAX
)
nbytes
=
INT_MAX
;
else
nbytes
=
n
;
md5_append
(
&
md5p
->
md5
,
buf
,
Py_SAFE_DOWNCAST
(
nbytes
,
Py_ssize_t
,
unsigned
int
));
buf
+=
nbytes
;
n
-=
nbytes
;
}
PyBuffer_Release
(
&
view
);
...
...
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