Skip to content

Commit dcc04ad

Browse files
committed
Check for PyFloat_AsDouble() failure
1 parent e92c3f2 commit dcc04ad

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/_imaging.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,10 @@ _putdata(ImagingObject *self, PyObject *args) {
16341634
return NULL; \
16351635
} else { \
16361636
value = PyFloat_AsDouble(op); \
1637+
if (value == -1.0 && PyErr_Occurred()) { \
1638+
Py_DECREF(seq); \
1639+
return NULL; \
1640+
} \
16371641
}
16381642
if (image->image8) {
16391643
if (PyBytes_Check(data)) {

0 commit comments

Comments
 (0)