mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Fix integer overflow on ILP32 systems (32-bit Linux).
This commit is contained in:
parent
4c01dc6550
commit
6f81501efd
|
@ -983,12 +983,9 @@ cms_profile_getattr_attributes(CmsProfileObject* self, void* closure)
|
||||||
{
|
{
|
||||||
cmsUInt64Number attr;
|
cmsUInt64Number attr;
|
||||||
cmsGetHeaderAttributes(self->profile, &attr);
|
cmsGetHeaderAttributes(self->profile, &attr);
|
||||||
#ifdef _WIN32
|
/* This works just as well on Windows (LLP64), 32-bit Linux
|
||||||
// Windows is weird this way.
|
(ILP32) and 64-bit Linux (LP64) systems. */
|
||||||
return PyLong_FromLongLong((long long) attr);
|
return PyLong_FromUnsignedLongLong((unsigned long long) attr);
|
||||||
#else
|
|
||||||
return PyInt_FromLong((long) attr);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject*
|
static PyObject*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user