From f0cb93348f16ee9bb3138d1ef977ebc796123c9d Mon Sep 17 00:00:00 2001 From: Yoga Ramalingam Date: Wed, 3 Dec 2014 12:20:17 -0500 Subject: [PATCH] Fix Py list length check in cpy_build_meta() --- src/pyvalues.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pyvalues.c b/src/pyvalues.c index 4f5c4ce3..137d5eb4 100644 --- a/src/pyvalues.c +++ b/src/pyvalues.c @@ -427,10 +427,9 @@ static meta_data_t *cpy_build_meta(PyObject *meta) { cpy_log_exception("building meta data"); return NULL; } - s = PyList_Size(l); - if (s < 0) - return NULL; + if (s <= 0) + return NULL; m = meta_data_create(); for (i = 0; i < s; ++i) { -- 2.11.0