ref: 042d77d68f9556d1ab39d20adec6292cf26fe20d
parent: c0429d46ff8542ab9650b0873817dca10d624138
author: Paul Brossier <piem@piem.org>
date: Tue Nov 27 22:33:01 EST 2018
[utils] hist with size null fails
--- a/src/utils/hist.c
+++ b/src/utils/hist.c
@@ -43,6 +43,9 @@
smpl_t step = (fhig-flow)/(smpl_t)(nelems);
smpl_t accum = step;
uint_t i;
+ if ((sint_t)nelems <= 0) {
+ return NULL;
+ }
s->nelems = nelems;
s->hist = new_fvec(nelems);
s->cent = new_fvec(nelems);