diff options
author | Niclas Zeising <zeising@FreeBSD.org> | 2020-04-01 15:32:13 +0000 |
---|---|---|
committer | Niclas Zeising <zeising@FreeBSD.org> | 2020-04-01 15:32:13 +0000 |
commit | 376e420afdb269fedabba688b44a95d067ccb89d (patch) | |
tree | 22962bf450d1814811c3b7eb52e297e4924bc3c4 /databases | |
parent | 4814f2d895668d60f21871dc486c4b65dbe66013 (diff) | |
download | ports-376e420afdb269fedabba688b44a95d067ccb89d.tar.gz ports-376e420afdb269fedabba688b44a95d067ccb89d.zip |
databases/rrdtool: fix segmentation fault
Fix a segmentation fault in rrd_graph:print_calc when vidx is -1 on GF_VRULE
Pull in upstream patch to fix the issue.
This fixes upstream bug #1078
PR: 244808
Submitted by: John W. O'Brien
Notes
Notes:
svn path=/head/; revision=530222
Diffstat (limited to 'databases')
-rw-r--r-- | databases/rrdtool/Makefile | 2 | ||||
-rw-r--r-- | databases/rrdtool/files/patch-src_rrd__graph__helper.c | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/databases/rrdtool/Makefile b/databases/rrdtool/Makefile index 6e8b4f96771b..507d71c64f35 100644 --- a/databases/rrdtool/Makefile +++ b/databases/rrdtool/Makefile @@ -3,7 +3,7 @@ PORTNAME= rrdtool PORTVERSION= 1.7.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases graphics MASTER_SITES= http://oss.oetiker.ch/rrdtool/pub/ diff --git a/databases/rrdtool/files/patch-src_rrd__graph__helper.c b/databases/rrdtool/files/patch-src_rrd__graph__helper.c new file mode 100644 index 000000000000..45167a881a9b --- /dev/null +++ b/databases/rrdtool/files/patch-src_rrd__graph__helper.c @@ -0,0 +1,25 @@ +Backport of: + +commit 254e4e44cd7828fba8f5bb18a7a29668221e0af5 +Author: John W. O'Brien <john@saltant.com> +Date: Sat Mar 14 08:49:47 2020 -0400 + + Fix double meaning of time 0 as uninitialized value + + Treat "VRULE:0#..." as "VRULE:1#..." because elsewhere xrule==0 is + used to mean xrule has not been set, which can lead to an array + bounds violation. + +--- src/rrd_graph_helper.c.orig 2020-03-14 17:06:47 UTC ++++ src/rrd_graph_helper.c +@@ -776,6 +776,10 @@ static graph_desc_t* newGraphDescription(image_desc_t + } + if (gf==GF_VRULE){ + gdp->xrule=val; ++ if (gdp->xrule == 0) { ++ /* distinguish from uninitialized */ ++ gdp->xrule++; ++ } + } + else { + gdp->yrule=val; |