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
c91d60a6
Kaydet (Commit)
c91d60a6
authored
Ara 19, 1992
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Changes to protect servers against broken clients
üst
424c673d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
xdr.py
Demo/rpc/xdr.py
+7
-2
No files found.
Demo/rpc/xdr.py
Dosyayı görüntüle @
c91d60a6
...
...
@@ -89,6 +89,8 @@ class Unpacker:
i
=
self
.
pos
self
.
pos
=
j
=
i
+
4
data
=
self
.
buf
[
i
:
j
]
if
len
(
data
)
<
4
:
raise
EOFError
x
=
long
(
ord
(
data
[
0
]))
<<
24
|
ord
(
data
[
1
])
<<
16
|
\
ord
(
data
[
2
])
<<
8
|
ord
(
data
[
3
])
# Return a Python long only if the value is not representable
...
...
@@ -99,7 +101,10 @@ class Unpacker:
def
unpack_uint
(
self
):
i
=
self
.
pos
self
.
pos
=
j
=
i
+
4
return
struct
.
unpack
(
'l'
,
self
.
buf
[
i
:
j
])
data
=
self
.
buf
[
i
:
j
]
if
len
(
data
)
<
4
:
raise
EOFError
return
struct
.
unpack
(
'l'
,
data
)
def
unpack_int
(
self
):
x
=
self
.
unpack_uint
()
...
...
@@ -126,7 +131,7 @@ class Unpacker:
i
=
self
.
pos
j
=
i
+
(
n
+
3
)
/
4
*
4
if
j
>
len
(
self
.
buf
):
raise
RuntimeError
,
'buffer overrun'
raise
EOFError
self
.
pos
=
j
return
self
.
buf
[
i
:
i
+
n
]
...
...
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