diff options
author | Mark Spruiell <mes@zeroc.com> | 2013-07-10 16:52:09 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2013-07-10 16:52:09 -0700 |
commit | f4d9d23db92d3aa5d4d2d10b090edf377d5fa019 (patch) | |
tree | 31963e4d9045f60bce843a78d99a85ea2f5154c8 /py/modules/IcePy/Operation.cpp | |
parent | Update dependencies (diff) | |
download | ice-f4d9d23db92d3aa5d4d2d10b090edf377d5fa019.tar.bz2 ice-f4d9d23db92d3aa5d4d2d10b090edf377d5fa019.tar.xz ice-f4d9d23db92d3aa5d4d2d10b090edf377d5fa019.zip |
ICE-5372 - validate argument to ice_exception in Python
Diffstat (limited to 'py/modules/IcePy/Operation.cpp')
-rw-r--r-- | py/modules/IcePy/Operation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp index f402b3b928c..083aa75aa66 100644 --- a/py/modules/IcePy/Operation.cpp +++ b/py/modules/IcePy/Operation.cpp @@ -732,6 +732,12 @@ amdCallbackIceException(AMDCallbackObject* self, PyObject* args) return 0; } + if(!PyObject_IsInstance(ex, PyExc_Exception)) + { + PyErr_Format(PyExc_TypeError, "ice_exception argument is not an exception"); + return 0; + } + try { assert(self->upcall); |