aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2005-07-05 23:01:17 +0800
committerlofi <lofi@FreeBSD.org>2005-07-05 23:01:17 +0800
commitebda3e0112288a6b912ab2fb47a1394f4c06aab5 (patch)
treecc8d9cf8c4a5bde062cc8b923f5b02ac6c44596a /x11-wm
parent61ab483511d3440e7afd568706ed79ad201eb428 (diff)
downloadfreebsd-ports-gnome-ebda3e0112288a6b912ab2fb47a1394f4c06aab5.tar.gz
freebsd-ports-gnome-ebda3e0112288a6b912ab2fb47a1394f4c06aab5.tar.zst
freebsd-ports-gnome-ebda3e0112288a6b912ab2fb47a1394f4c06aab5.zip
Fix build on 4.x [1], don't crash with malloc debug flag J enabled [2]
Reported by: Tod McQuillin <devin@spamcop.net> [1], Doug White <dwhite@gumbysoft.com> [2] Submitted by: Tod McQuillin <devin@spamcop.net> [1] PR: ports/82994 [1]
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/kompmgr/Makefile1
-rw-r--r--x11-wm/kompmgr/files/patch-kwin_kompmgr_kompmgr.c28
2 files changed, 29 insertions, 0 deletions
diff --git a/x11-wm/kompmgr/Makefile b/x11-wm/kompmgr/Makefile
index 002362af26bc..26b11516bb95 100644
--- a/x11-wm/kompmgr/Makefile
+++ b/x11-wm/kompmgr/Makefile
@@ -7,6 +7,7 @@
PORTNAME= kompmgr
PORTVERSION= ${KDE_VERSION}
+PORTREVISION= 1
CATEGORIES= x11-wm kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/x11-wm/kompmgr/files/patch-kwin_kompmgr_kompmgr.c b/x11-wm/kompmgr/files/patch-kwin_kompmgr_kompmgr.c
new file mode 100644
index 000000000000..3aea64e34818
--- /dev/null
+++ b/x11-wm/kompmgr/files/patch-kwin_kompmgr_kompmgr.c
@@ -0,0 +1,28 @@
+--- kwin/kompmgr/kompmgr.c.orig Tue Jul 5 16:23:25 2005
++++ kwin/kompmgr/kompmgr.c Tue Jul 5 16:25:43 2005
+@@ -1807,6 +1807,7 @@
+ {
+ win *new = malloc (sizeof (win));
+ win **p;
++ unsigned int tmp;
+
+ if (!new)
+ return;
+@@ -1867,7 +1868,7 @@
+ new->shadowSize = get_shadow_prop (dpy, new);
+ new->shapable = get_shapable_prop(dpy, new);
+ new->titleHeight = get_titleHeight_prop(dpy, new);
+- unsigned int tmp = get_dim_prop(dpy, new);
++ tmp = get_dim_prop(dpy, new);
+ new->dimPicture = (tmp < OPAQUE) ? solid_picture (dpy, True, (double)tmp/OPAQUE, 0.1, 0.1, 0.1) : None;
+ new->windowType = determine_wintype (dpy, new->id);
+ determine_mode (dpy, new);
+@@ -2411,7 +2411,7 @@
+ const char *home = getenv("HOME");
+ const char *configfile = "/.xcompmgrrc";
+ wasNull = True;
+- filename = (char*)malloc((strlen(home)+strlen(configfile)+1)*sizeof(char));
++ filename = (char*)calloc((strlen(home)+strlen(configfile)+1), sizeof(char));
+
+ strcat(filename, home);
+ strcat(filename, configfile);