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
1f953176
Kaydet (Commit)
1f953176
authored
Haz 07, 2019
tarafından
Jeroen Demeyer
Kaydeden (comit)
Gregory P. Smith
Haz 07, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-37138: fix undefined behaviour with memcpy() on NULL array (GH-13867)
üst
e7e5039d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
classobject.c
Objects/classobject.c
+5
-1
No files found.
Objects/classobject.c
Dosyayı görüntüle @
1f953176
...
@@ -71,7 +71,11 @@ method_vectorcall(PyObject *method, PyObject *const *args,
...
@@ -71,7 +71,11 @@ method_vectorcall(PyObject *method, PyObject *const *args,
}
}
/* use borrowed references */
/* use borrowed references */
newargs
[
0
]
=
self
;
newargs
[
0
]
=
self
;
memcpy
(
newargs
+
1
,
args
,
totalargs
*
sizeof
(
PyObject
*
));
if
(
totalargs
)
{
/* bpo-37138: if totalargs == 0, then args may be
* NULL and calling memcpy() with a NULL pointer
* is undefined behaviour. */
memcpy
(
newargs
+
1
,
args
,
totalargs
*
sizeof
(
PyObject
*
));
}
result
=
_PyObject_Vectorcall
(
func
,
newargs
,
nargs
+
1
,
kwnames
);
result
=
_PyObject_Vectorcall
(
func
,
newargs
,
nargs
+
1
,
kwnames
);
PyMem_Free
(
newargs
);
PyMem_Free
(
newargs
);
}
}
...
...
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