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
0049249d
Kaydet (Commit)
0049249d
authored
Eyl 04, 2010
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file
descriptor is provided. Patch by Pascal Chambon.
üst
7d6e076f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
test_fileio.py
Lib/test/test_fileio.py
+3
-0
NEWS
Misc/NEWS
+3
-0
msvcrtmodule.c
PC/msvcrtmodule.c
+3
-0
No files found.
Lib/test/test_fileio.py
Dosyayı görüntüle @
0049249d
...
@@ -309,6 +309,9 @@ class OtherFileTests(unittest.TestCase):
...
@@ -309,6 +309,9 @@ class OtherFileTests(unittest.TestCase):
def
testInvalidFd
(
self
):
def
testInvalidFd
(
self
):
self
.
assertRaises
(
ValueError
,
_FileIO
,
-
10
)
self
.
assertRaises
(
ValueError
,
_FileIO
,
-
10
)
self
.
assertRaises
(
OSError
,
_FileIO
,
make_bad_fd
())
self
.
assertRaises
(
OSError
,
_FileIO
,
make_bad_fd
())
if
sys
.
platform
==
'win32'
:
import
msvcrt
self
.
assertRaises
(
IOError
,
msvcrt
.
get_osfhandle
,
make_bad_fd
())
def
testBadModeArgument
(
self
):
def
testBadModeArgument
(
self
):
# verify that we get a sensible error message for bad mode argument
# verify that we get a sensible error message for bad mode argument
...
...
Misc/NEWS
Dosyayı görüntüle @
0049249d
...
@@ -100,6 +100,9 @@ Core and Builtins
...
@@ -100,6 +100,9 @@ Core and Builtins
Extensions
Extensions
----------
----------
- Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file
descriptor is provided. Patch by Pascal Chambon.
- Issue #7736: Release the GIL around calls to opendir() and closedir()
- Issue #7736: Release the GIL around calls to opendir() and closedir()
in the posix module. Patch by Marcin Bachry.
in the posix module. Patch by Marcin Bachry.
...
...
PC/msvcrtmodule.c
Dosyayı görüntüle @
0049249d
...
@@ -143,6 +143,9 @@ msvcrt_get_osfhandle(PyObject *self, PyObject *args)
...
@@ -143,6 +143,9 @@ msvcrt_get_osfhandle(PyObject *self, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"i:get_osfhandle"
,
&
fd
))
if
(
!
PyArg_ParseTuple
(
args
,
"i:get_osfhandle"
,
&
fd
))
return
NULL
;
return
NULL
;
if
(
!
_PyVerify_fd
(
fd
))
return
PyErr_SetFromErrno
(
PyExc_IOError
);
handle
=
_get_osfhandle
(
fd
);
handle
=
_get_osfhandle
(
fd
);
if
(
handle
==
-
1
)
if
(
handle
==
-
1
)
return
PyErr_SetFromErrno
(
PyExc_IOError
);
return
PyErr_SetFromErrno
(
PyExc_IOError
);
...
...
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