summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2003-02-09 20:34:03 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2003-02-09 20:34:03 +0000
commitca4878f256c2afbbd09efa34cd084ee907ecbe32 (patch)
tree9fb5121d0d2e2349d4337fa347fa907950dbcbc3 /x11
parentFix build with newer versions of libgnomedb. (diff)
Fix bugs that caused program to dump core.
PR: 48012 Submitted by: Volker Stolz <stolz@fump.kawo2.rwth-aachen.de>
Notes
Notes: svn path=/head/; revision=75212
Diffstat (limited to 'x11')
-rw-r--r--x11/xnee/Makefile1
-rw-r--r--x11/xnee/files/patch-src::lib::xnee.c27
2 files changed, 28 insertions, 0 deletions
diff --git a/x11/xnee/Makefile b/x11/xnee/Makefile
index e7fce25b57ee..02c4b30d09b5 100644
--- a/x11/xnee/Makefile
+++ b/x11/xnee/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xnee
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/x11/xnee/files/patch-src::lib::xnee.c b/x11/xnee/files/patch-src::lib::xnee.c
new file mode 100644
index 000000000000..ebc07371d273
--- /dev/null
+++ b/x11/xnee/files/patch-src::lib::xnee.c
@@ -0,0 +1,27 @@
+
+$FreeBSD$
+
+--- src/lib/xnee.c.orig Sun Feb 9 21:17:05 2003
++++ src/lib/xnee.c Sun Feb 9 21:18:44 2003
+@@ -501,7 +501,11 @@
+ int ret;
+ int window;
+ int screen;
+-
++
++ if (xd->grab==NULL)
++ {
++ xd->grab = XOpenDisplay (NULL);
++ }
+ screen = DefaultScreen (xd->grab);
+ window = RootWindow(xd->grab, screen );
+ xnee_verbose (xd, "window %d\n", window);
+@@ -696,7 +700,7 @@
+ xnee_new_xnee_data()
+ {
+
+- xnee_data* xd = (xnee_data*) malloc (sizeof (xnee_data));
++ xnee_data* xd = (xnee_data*) calloc (1, sizeof (xnee_data));
+ if (xd==NULL)
+ {
+ xnee_print_error ("Could not allocate memory ........\n");