aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2002-07-17 06:36:49 +0800
committerpat <pat@FreeBSD.org>2002-07-17 06:36:49 +0800
commit572242e51f02f8f4a80420bd7855047283ab7987 (patch)
treeb242b4172fabc2c412ea8bd18f837757a58c5b07 /x11
parent5e55f4bc00db42f2ba71ff3e7980b39253dd33ff (diff)
downloadfreebsd-ports-gnome-572242e51f02f8f4a80420bd7855047283ab7987.tar.gz
freebsd-ports-gnome-572242e51f02f8f4a80420bd7855047283ab7987.tar.zst
freebsd-ports-gnome-572242e51f02f8f4a80420bd7855047283ab7987.zip
Fix instance where wmcliphist segfaults when reading the history file and
bump PORTREVISION. PR: ports/40662 Submitted by: Simon 'corecode' Schubert <corecode@corecode.ath.cx>
Diffstat (limited to 'x11')
-rw-r--r--x11/wmcliphist/Makefile1
-rw-r--r--x11/wmcliphist/files/patch-history.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/x11/wmcliphist/Makefile b/x11/wmcliphist/Makefile
index 9b9792337a7d..d95c966c4c58 100644
--- a/x11/wmcliphist/Makefile
+++ b/x11/wmcliphist/Makefile
@@ -7,6 +7,7 @@
PORTNAME= wmcliphist
PORTVERSION= 0.3
+PORTREVISION= 1
CATEGORIES= x11 windowmaker
MASTER_SITES= http://linux.nawebu.cz/wmcliphist/
diff --git a/x11/wmcliphist/files/patch-history.c b/x11/wmcliphist/files/patch-history.c
new file mode 100644
index 000000000000..1e07c54d73a2
--- /dev/null
+++ b/x11/wmcliphist/files/patch-history.c
@@ -0,0 +1,17 @@
+--- history.c.orig Sun Dec 16 23:42:47 2001
++++ history.c Tue Jul 16 20:14:38 2002
+@@ -123,12 +123,13 @@
+ break;
+ }
+
+- buf = g_new0(gchar, len);
++ buf = g_new0(gchar, len + 1);
+ if (fread(buf, len, 1, f) != 1) {
+ g_free(buf);
+ tmp_errno = E_INVALID;
+ break;
+ }
++ buf[len] = '\0';
+
+ if (fread(&locked, sizeof(gint), 1, f) != 1) {
+ g_free(buf);