Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3d326642
Commit
3d326642
authored
Feb 21, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues on 32-bit systems introduced by r88460
parent
97b67216
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Modules/zlibmodule.c
Modules/zlibmodule.c
+6
-6
No files found.
Modules/zlibmodule.c
View file @
3d326642
...
...
@@ -951,10 +951,10 @@ PyZlib_adler32(PyObject *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
/* Avoid truncation of length for very large buffers. adler32() takes
length as an unsigned int, which may be narrower than Py_ssize_t. */
while
(
len
>
(
Py_ssize_t
)
UINT_MAX
)
{
while
(
len
>
(
size_t
)
UINT_MAX
)
{
adler32val
=
adler32
(
adler32val
,
buf
,
UINT_MAX
);
buf
+=
UINT_MAX
;
len
-=
UINT_MAX
;
buf
+=
(
size_t
)
UINT_MAX
;
len
-=
(
size_t
)
UINT_MAX
;
}
adler32val
=
adler32
(
adler32val
,
buf
,
len
);
Py_END_ALLOW_THREADS
...
...
@@ -989,10 +989,10 @@ PyZlib_crc32(PyObject *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
/* Avoid truncation of length for very large buffers. crc32() takes
length as an unsigned int, which may be narrower than Py_ssize_t. */
while
(
len
>
(
Py_ssize_t
)
UINT_MAX
)
{
while
(
len
>
(
size_t
)
UINT_MAX
)
{
crc32val
=
crc32
(
crc32val
,
buf
,
UINT_MAX
);
buf
+=
UINT_MAX
;
len
-=
UINT_MAX
;
buf
+=
(
size_t
)
UINT_MAX
;
len
-=
(
size_t
)
UINT_MAX
;
}
signed_val
=
crc32
(
crc32val
,
buf
,
len
);
Py_END_ALLOW_THREADS
...
...
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