Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2002 20:35:18 +0200 (CEST)
From:      "Simon 'corecode' Schubert" <corecode@corecode.ath.cx>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        pat@FreeBSD.org
Subject:   ports/40662: unbreak x11/wmcliphist
Message-ID:  <200207161835.g6GIZIPr019877@terrorfish.uni.stoert.net>

next in thread | raw e-mail | index | archive | help

>Number:         40662
>Category:       ports
>Synopsis:       unbreak x11/wmcliphist
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 16 11:40:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Simon 'corecode' Schubert
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD terrorfish.uni.stoert.net 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Sat Jul 13 17:16:24 CEST 2002 corecode@terrorfish.uni.stoert.net:/usr/obj/k7/usr/src/sys/TERRORFISH i386


	
>Description:
wmcliphist segfaults under certain conditions when reading the history file

this is caused by feeding an unterminated string to regexec(3)

upstream author has been notified seperately
	
>How-To-Repeat:
have something in ~/.wmcliphist.data and start wmcliphist
	
>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/x11/wmcliphist/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	17 Feb 2002 03:52:27 -0000	1.3
+++ Makefile	16 Jul 2002 18:25:29 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	wmcliphist
 PORTVERSION=	0.3
+PORTREVISION=	1
 CATEGORIES=	x11 windowmaker
 MASTER_SITES=	http://linux.nawebu.cz/wmcliphist/
 
Index: files/patch-history.c
===================================================================
RCS file: files/patch-history.c
diff -N files/patch-history.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-history.c	16 Jul 2002 18:20:21 -0000
@@ -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);
	


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207161835.g6GIZIPr019877>