diff --git a/rrdtool-tclsegfault.patch b/rrdtool-tclsegfault.patch new file mode 100644 index 0000000..a77e80a --- /dev/null +++ b/rrdtool-tclsegfault.patch @@ -0,0 +1,28 @@ +--- bindings/tcl/tclrrd.c ++++ 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); diff --git a/rrdtool.changes b/rrdtool.changes index 6e69ecd..2f24d0b 100644 --- a/rrdtool.changes +++ b/rrdtool.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 12 11:35:26 UTC 2011 - max@novell.com + +- Fix two segfaults in the Tcl binding. + ------------------------------------------------------------------- Wed May 11 11:48:32 UTC 2011 - max@novell.com diff --git a/rrdtool.spec b/rrdtool.spec index 5238ca1..0b487b4 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -41,6 +41,7 @@ Release: 6 Source: %{name}-%{version}.tar.bz2 Patch1: rrdtool-lua_lib64.patch Patch2: rrdtool-tclversion.patch +Patch3: rrdtool-tclsegfault.patch # http://www.infodrom.org/projects/cgilib/download/cgilib-%{cgilib_version}.tar.gz Source1: cgilib-%{cgilib_version}.tar.bz2 Patch11: cgilib-fix_automake.patch @@ -61,6 +62,7 @@ definable time period. %patch1 %endif %patch2 +%patch3 pushd "cgilib-%{cgilib_version}" %patch11 popd #cgilib