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
b7a688b3
Kaydet (Commit)
b7a688b3
authored
Tem 02, 2015
tarafından
Lars Gustäbel
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24514: tarfile now tolerates number fields consisting of only whitespace.
üst
3ef80587
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
tarfile.py
Lib/tarfile.py
+2
-1
test_tarfile.py
Lib/test/test_tarfile.py
+4
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/tarfile.py
Dosyayı görüntüle @
b7a688b3
...
...
@@ -178,7 +178,8 @@ def nti(s):
n
=
-
(
256
**
(
len
(
s
)
-
1
)
-
n
)
else
:
try
:
n
=
int
(
nts
(
s
,
"ascii"
,
"strict"
)
or
"0"
,
8
)
s
=
nts
(
s
,
"ascii"
,
"strict"
)
n
=
int
(
s
.
strip
()
or
"0"
,
8
)
except
ValueError
:
raise
InvalidHeaderError
(
"invalid header"
)
return
n
...
...
Lib/test/test_tarfile.py
Dosyayı görüntüle @
b7a688b3
...
...
@@ -1842,6 +1842,10 @@ class MiscTest(unittest.TestCase):
self
.
assertEqual
(
tarfile
.
nti
(
b
"
\xff\x00\x00\x00\x00\x00\x00\x00
"
),
-
0x100000000000000
)
# Issue 24514: Test if empty number fields are converted to zero.
self
.
assertEqual
(
tarfile
.
nti
(
b
"
\0
"
),
0
)
self
.
assertEqual
(
tarfile
.
nti
(
b
"
\0
"
),
0
)
def
test_write_number_fields
(
self
):
self
.
assertEqual
(
tarfile
.
itn
(
1
),
b
"0000001
\x00
"
)
self
.
assertEqual
(
tarfile
.
itn
(
0
o7777777
),
b
"7777777
\x00
"
)
...
...
Misc/NEWS
Dosyayı görüntüle @
b7a688b3
...
...
@@ -64,6 +64,9 @@ Core and Builtins
Library
-------
-
Issue
#
24514
:
tarfile
now
tolerates
number
fields
consisting
of
only
whitespace
.
-
Issue
#
19176
:
Fixed
doctype
()
related
bugs
in
C
implementation
of
ElementTree
.
A
deprecation
warning
no
longer
issued
by
XMLParser
subclass
with
default
doctype
()
method
.
Direct
call
of
doctype
()
now
issues
a
warning
.
Parser
's
...
...
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