From: Tobias Oetiker Date: Tue, 19 Apr 2016 08:01:07 +0000 (+0200) Subject: fix for #707 X-Git-Tag: v1.5.6~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3079839b38ca16686231bff5ac07ebdaf4912f31;p=thirdparty%2Frrdtool-1.x.git fix for #707 --- diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index 4258b099..bc6d430c 100644 --- a/src/rrd_rpncalc.c +++ b/src/rrd_rpncalc.c @@ -333,7 +333,10 @@ rpnp_t *rpn_parse( rpnp = NULL; expr = (char *) expr_const; - + if (! *expr){ + rrd_set_error("can not parse an empty rpn expression"); + return NULL; + } while (*expr) { if ((rpnp = (rpnp_t *) rrd_realloc(rpnp, (++steps + 2) * sizeof(rpnp_t))) == NULL) {