summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorPatrick Li <pat@FreeBSD.org>2002-07-16 22:36:49 +0000
committerPatrick Li <pat@FreeBSD.org>2002-07-16 22:36:49 +0000
commit66b03afbc753905263a170bfd46a97afc2929ae3 (patch)
treed24fac4de8e357e75df7bf404f80263afede63a3 /x11
parent52df9e830222cedcfa57fbcfc04eac979cf21ce4 (diff)
downloadfreebsd-ports-66b03afbc753905263a170bfd46a97afc2929ae3.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);