]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrd_graph: initialize new data member (fix #441)
authorPeter A. Bigot <pab@pabigot.com>
Mon, 17 Feb 2014 23:24:25 +0000 (17:24 -0600)
committerTobias Oetiker <tobi@oetiker.ch>
Wed, 26 Feb 2014 05:21:20 +0000 (06:21 +0100)
primary_axis_format was added to image_desc_t but rrd_graph_init was not
updated to initialize it, resulting in this error when the garbage
values were used as axis labels:

(process:24893): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

src/rrd_graph.c

index 0bc5dbdbe5c0d2a4995cf0dbc83db2f22fc48a1f..9662231b4daedeabee4fb4a0cbb96172b0806e35 100644 (file)
@@ -4347,6 +4347,7 @@ void rrd_graph_init(
     im->second_axis_shift = 0; /* no shift by default */
     im->second_axis_legend[0] = '\0';
     im->second_axis_format[0] = '\0';
+    im->primary_axis_format[0] = '\0';
     im->yorigin = 0;
     im->yOriginLegend = 0;
     im->yOriginLegendY = 0;