rrdtool/rrdtool-tclsegfault.patch
Dirk Mueller f2c31df8ab Accepting request 443080 from home:luizluca:branches:devel:languages:python
Updated to 1.6.0

As since upstream now supports lua since 5.0 (tested until 5.2), maybe it should remove the fixed requirement lua51-devel

OBS-URL: https://build.opensuse.org/request/show/443080
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/rrdtool?expand=0&rev=71
2016-12-06 12:05:05 +00:00

31 lines
922 B
Diff

Index: bindings/tcl/tclrrd.c
===================================================================
--- bindings/tcl/tclrrd.c.orig
+++ bindings/tcl/tclrrd.c
@@ -472,6 +472,12 @@ static int Rrd_Graph(
char **argv2;
CONST84 char *save;
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "RRD Error: needs image filename",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
/*
* If the "filename" is a Tcl fileID, then arrange for rrd_graph() to write to
* that file descriptor. Will this work with windoze? I have no idea.
@@ -597,6 +603,12 @@ static int Rrd_Resize(
{
char **argv2;
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
argv2 = getopt_init(argc, argv);
rrd_resize(argc, argv2);
getopt_cleanup(argc, argv2);