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
be92971b
Kaydet (Commit)
be92971b
authored
Nis 15, 2013
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #17710: Fix cPickle raising a SystemError on bogus input.
üst
108d1b4a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
pickle.py
Lib/pickle.py
+1
-1
pickletester.py
Lib/test/pickletester.py
+2
-0
NEWS
Misc/NEWS
+2
-0
cPickle.c
Modules/cPickle.c
+6
-4
No files found.
Lib/pickle.py
Dosyayı görüntüle @
be92971b
...
@@ -962,7 +962,7 @@ class Unpickler:
...
@@ -962,7 +962,7 @@ class Unpickler:
rep
=
self
.
readline
()[:
-
1
]
rep
=
self
.
readline
()[:
-
1
]
for
q
in
"
\"
'"
:
# double or single quote
for
q
in
"
\"
'"
:
# double or single quote
if
rep
.
startswith
(
q
):
if
rep
.
startswith
(
q
):
if
not
rep
.
endswith
(
q
):
if
len
(
rep
)
<
2
or
not
rep
.
endswith
(
q
):
raise
ValueError
,
"insecure string pickle"
raise
ValueError
,
"insecure string pickle"
rep
=
rep
[
len
(
q
):
-
len
(
q
)]
rep
=
rep
[
len
(
q
):
-
len
(
q
)]
break
break
...
...
Lib/test/pickletester.py
Dosyayı görüntüle @
be92971b
...
@@ -538,6 +538,8 @@ class AbstractPickleTests(unittest.TestCase):
...
@@ -538,6 +538,8 @@ class AbstractPickleTests(unittest.TestCase):
"'abc
\"
"
,
# open quote and close quote don't match
"'abc
\"
"
,
# open quote and close quote don't match
"'abc' ?"
,
# junk after close quote
"'abc' ?"
,
# junk after close quote
"'
\\
'"
,
# trailing backslash
"'
\\
'"
,
# trailing backslash
"'"
,
# issue #17710
"' "
,
# issue #17710
# some tests of the quoting rules
# some tests of the quoting rules
#"'abc\"\''",
#"'abc\"\''",
#"'\\\\a\'\'\'\\\'\\\\\''",
#"'\\\\a\'\'\'\\\'\\\\\''",
...
...
Misc/NEWS
Dosyayı görüntüle @
be92971b
...
@@ -28,6 +28,8 @@ Core and Builtins
...
@@ -28,6 +28,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
17710
:
Fix
cPickle
raising
a
SystemError
on
bogus
input
.
-
Issue
#
17341
:
Include
the
invalid
name
in
the
error
messages
from
re
about
-
Issue
#
17341
:
Include
the
invalid
name
in
the
error
messages
from
re
about
invalid
group
names
.
invalid
group
names
.
...
...
Modules/cPickle.c
Dosyayı görüntüle @
be92971b
...
@@ -3643,17 +3643,19 @@ load_string(Unpicklerobject *self)
...
@@ -3643,17 +3643,19 @@ load_string(Unpicklerobject *self)
/* Strip outermost quotes */
/* Strip outermost quotes */
while
(
s
[
len
-
1
]
<=
' '
)
while
(
len
>
0
&&
s
[
len
-
1
]
<=
' '
)
len
--
;
len
--
;
if
(
s
[
0
]
==
'"'
&&
s
[
len
-
1
]
==
'"'
)
{
if
(
len
>
1
&&
s
[
0
]
==
'"'
&&
s
[
len
-
1
]
==
'"'
)
{
s
[
len
-
1
]
=
'\0'
;
s
[
len
-
1
]
=
'\0'
;
p
=
s
+
1
;
p
=
s
+
1
;
len
-=
2
;
len
-=
2
;
}
else
if
(
s
[
0
]
==
'\''
&&
s
[
len
-
1
]
==
'\''
){
}
else
if
(
len
>
1
&&
s
[
0
]
==
'\''
&&
s
[
len
-
1
]
==
'\''
)
{
s
[
len
-
1
]
=
'\0'
;
s
[
len
-
1
]
=
'\0'
;
p
=
s
+
1
;
p
=
s
+
1
;
len
-=
2
;
len
-=
2
;
}
else
}
else
goto
insecure
;
goto
insecure
;
/********************************************/
/********************************************/
...
...
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