summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorKevin Greenan <kmgreen2@gmail.com>2014-10-23 08:55:13 -0700
committerKevin Greenan <kmgreen2@gmail.com>2014-10-23 08:55:13 -0700
commit8bde5b3ec7338319ebbb9bef6c7dce5f2c7fbd37 (patch)
tree1232d459dc9981bbe1fd27d5c5f5e8ff25360d4d /src/c
parent61a16dbbc0a60ae1c5eb344ee2c40ed4ea330786 (diff)
downloadpyeclib-8bde5b3ec7338319ebbb9bef6c7dce5f2c7fbd37.tar.gz
A few quick fixes:
1.) Tests were not compatible with new liberasurecode API 2.) Ensure PyList was allocated
Diffstat (limited to 'src/c')
-rw-r--r--src/c/pyeclib_c/pyeclib_c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/c/pyeclib_c/pyeclib_c.c b/src/c/pyeclib_c/pyeclib_c.c
index 3ea6830..365f463 100644
--- a/src/c/pyeclib_c/pyeclib_c.c
+++ b/src/c/pyeclib_c/pyeclib_c.c
@@ -668,6 +668,10 @@ pyeclib_c_decode(PyObject *self, PyObject *args)
ret_payload = PY_BUILDVALUE_OBJ_LEN(c_orig_payload, orig_data_size);
} else {
ret_payload = PyList_New(num_ranges);
+ if (NULL == ret_payload) {
+ PyErr_SetString(PyECLibError, "Could not alloc list for range payloads in pyeclib.decode");
+ goto error;
+ }
range_payload_size = 0;
for (i = 0; i < num_ranges; i++) {
/* Check that range is within the original buffer */