SHA256
1
0
forked from pool/rrdtool

Accepting request 70105 from home:rmax:branches:devel:languages:python

Fix two segfaults in the Tcl binding

OBS-URL: https://build.opensuse.org/request/show/70105
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/rrdtool?expand=0&rev=20
This commit is contained in:
Cristian Rodríguez 2011-05-13 17:34:23 +00:00 committed by Git OBS Bridge
parent 7beef52259
commit 04a4c4cb4d
3 changed files with 35 additions and 0 deletions

28
rrdtool-tclsegfault.patch Normal file
View File

@ -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);

View File

@ -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

View File

@ -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