projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure we use correct sizes for vsnprintf (sizeof) and strncpy (sizeof-1). --...
[rrdtool.git]
/
src
/
rrd_graph.c
diff --git
a/src/rrd_graph.c
b/src/rrd_graph.c
index
40539b3
..
19e3c40
100644
(file)
--- a/
src/rrd_graph.c
+++ b/
src/rrd_graph.c
@@
-3115,6
+3115,10
@@
int graph_paint(
grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
info.u_cnt = im->yimg;
grinfo_push(im, sprintf_alloc("image_height"), RD_I_CNT, info);
grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
info.u_cnt = im->yimg;
grinfo_push(im, sprintf_alloc("image_height"), RD_I_CNT, info);
+ info.u_cnt = im->start;
+ grinfo_push(im, sprintf_alloc("graph_start"), RD_I_CNT, info);
+ info.u_cnt = im->end;
+ grinfo_push(im, sprintf_alloc("graph_end"), RD_I_CNT, info);
/* get actual drawing data and find min and max values */
if (data_proc(im) == -1)
/* get actual drawing data and find min and max values */
if (data_proc(im) == -1)
@@
-3690,9
+3694,9
@@
int rrd_graph(
*ymax = 0;
while (walker) {
if (strcmp(walker->key, "image_width") == 0) {
*ymax = 0;
while (walker) {
if (strcmp(walker->key, "image_width") == 0) {
- *xsize = walker->value.u_
i
nt;
+ *xsize = walker->value.u_
c
nt;
} else if (strcmp(walker->key, "image_height") == 0) {
} else if (strcmp(walker->key, "image_height") == 0) {
- *ysize = walker->value.u_
i
nt;
+ *ysize = walker->value.u_
c
nt;
} else if (strcmp(walker->key, "value_min") == 0) {
*ymin = walker->value.u_val;
} else if (strcmp(walker->key, "value_max") == 0) {
} else if (strcmp(walker->key, "value_min") == 0) {
*ymin = walker->value.u_val;
} else if (strcmp(walker->key, "value_max") == 0) {