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
75c3d6ff
Kaydet (Commit)
75c3d6ff
authored
Şub 13, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#3694: fix an "XXX undetected error" leak in struct.
üst
c8dcfb6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
test_struct.py
Lib/test/test_struct.py
+4
-0
_struct.c
Modules/_struct.c
+1
-1
No files found.
Lib/test/test_struct.py
Dosyayı görüntüle @
75c3d6ff
...
...
@@ -524,6 +524,10 @@ class StructTest(unittest.TestCase):
self
.
assertRaises
(
struct
.
error
,
s
.
pack_into
,
small_buf
,
0
,
test_string
)
self
.
assertRaises
(
struct
.
error
,
s
.
pack_into
,
small_buf
,
2
,
test_string
)
# Test bogus offset (issue 3694)
sb
=
small_buf
self
.
assertRaises
(
TypeError
,
struct
.
pack_into
,
b
'1'
,
sb
,
None
)
def
test_pack_into_fn
(
self
):
test_string
=
b
'Reykjavik rocks, eow!'
writable_buf
=
array
.
array
(
'b'
,
b
' '
*
100
)
...
...
Modules/_struct.c
Dosyayı görüntüle @
75c3d6ff
...
...
@@ -1785,7 +1785,7 @@ s_pack_into(PyObject *self, PyObject *args)
assert
(
buffer_len
>=
0
);
/* Extract the offset from the first argument */
offset
=
Py
Long_AsSsize_t
(
PyTuple_GET_ITEM
(
args
,
1
)
);
offset
=
Py
Number_AsSsize_t
(
PyTuple_GET_ITEM
(
args
,
1
),
PyExc_IndexError
);
if
(
offset
==
-
1
&&
PyErr_Occurred
())
return
NULL
;
...
...
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