Commit c731bbe6 authored by Christian Heimes's avatar Christian Heimes

Propagate error when PyByteArray_Resize() fails in bytearray_translate()

CID 715334
parent 8e090849
......@@ -1506,7 +1506,10 @@ bytearray_translate(PyByteArrayObject *self, PyObject *args)
}
/* Fix the size of the resulting string */
if (inlen > 0)
PyByteArray_Resize(result, output - output_start);
if (PyByteArray_Resize(result, output - output_start) < 0) {
Py_CLEAR(result);
goto done;
}
done:
if (tableobj != NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment