summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-06-06 20:39:23 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-06-06 20:39:23 (GMT)
commitdc2476500d91082f0c907772c83a044bf49af279 (patch)
tree72075b673111fc2ef0dd389d31e3a2918dd1730c /Objects/longobject.c
parentf6713e84afc5addcfa8477dbdf2c027787f711c0 (diff)
downloadcpython-dc2476500d91082f0c907772c83a044bf49af279.zip
cpython-dc2476500d91082f0c907772c83a044bf49af279.tar.gz
cpython-dc2476500d91082f0c907772c83a044bf49af279.tar.bz2
bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860)
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index a1103f6..50ea2a4 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1376,7 +1376,7 @@ _PyLong_AsUnsignedLongLongMask(PyObject *vv)
if (vv == NULL || !PyLong_Check(vv)) {
PyErr_BadInternalCall();
- return (unsigned long) -1;
+ return (unsigned long long) -1;
}
v = (PyLongObject *)vv;
switch(Py_SIZE(v)) {
@@ -1404,7 +1404,7 @@ PyLong_AsUnsignedLongLongMask(PyObject *op)
if (op == NULL) {
PyErr_BadInternalCall();
- return (unsigned long)-1;
+ return (unsigned long long)-1;
}
if (PyLong_Check(op)) {