From owner-freebsd-ports Thu Aug 1 12: 7:48 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0249737B400 for ; Thu, 1 Aug 2002 12:07:47 -0700 (PDT) Received: from yosemite.rwc.gnac.net (yosemite.rwc.gnac.net [198.151.248.221]) by mx1.FreeBSD.org (Postfix) with ESMTP id C97C243E84 for ; Thu, 1 Aug 2002 12:07:45 -0700 (PDT) (envelope-from guy@certaintysolutions.com) Received: by yosemite.rwc.gnac.net; id MAA26834; Thu, 1 Aug 2002 12:07:44 -0700 (PDT) Received: from unknown(192.168.1.21) by yosemite.rwc.gnac.net via smap (V5.0) id xma026830; Thu, 1 Aug 02 12:07:25 -0700 Received: from tweety.main.gnac.com (localhost.main.gnac.com [127.0.0.1]) by pepe.corp.gnac.com (8.11.0/8.8.7/GNAC-GW-2.1) with ESMTP id g71J7QC03058 for ; Thu, 1 Aug 2002 12:07:26 -0700 (PDT) Received: (from guy@localhost) by tweety.main.gnac.com (8.9.3/8.7.3/GNAC-COM-1.1) id MAA19407 for ports@freebsd.org; Thu, 1 Aug 2002 12:07:25 -0700 (PDT) Received: from pepe.corp.gnac.com (pepe.main.gnac.com [192.168.1.21]) by tweety.main.gnac.com (8.9.3/8.8.5/GNAC-GW-2.1) with ESMTP id MAA19393 for ; Thu, 1 Aug 2002 12:06:45 -0700 (PDT) Received: from yosemite.rwc.gnac.net (localhost.main.gnac.com [127.0.0.1]) by pepe.corp.gnac.com (8.11.0/8.8.7/GNAC-GW-2.1) with ESMTP id g71J6jY03046 for ; Thu, 1 Aug 2002 12:06:45 -0700 (PDT) Received: by yosemite.rwc.gnac.net; id MAA24969; Thu, 1 Aug 2002 12:06:44 -0700 (PDT) Received: from unknown(209.250.142.227) by yosemite.rwc.gnac.net via smap (V5.0) id xma019780; Thu, 1 Aug 02 12:05:47 -0700 Received: from localhost.obstruction.com (guy@localhost [127.0.0.1]) by localhost.crtsol.com (8.12.3/8.12.3) with ESMTP id g71JAXRt000919; Thu, 1 Aug 2002 15:10:33 -0400 (EDT) (envelope-from guy@localhost.obstruction.com) Received: (from guy@localhost) by localhost.obstruction.com (8.12.3/8.12.3/Submit) id g71JARcX000918; Thu, 1 Aug 2002 15:10:27 -0400 (EDT) Date: Thu, 1 Aug 2002 15:10:27 -0400 From: Guy Middleton To: marcel@mesa.nl Cc: ports@freebsd.org Subject: environment variable bug in mpage Message-ID: <20020801151027.A903@blink.corp.gnac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I found a bug in mpage, an extra call to strcpy which clobbers the stack. Here is the patch: --- args.c.orig Thu Aug 1 15:05:26 2002 +++ args.c Thu Aug 1 15:05:32 2002 @@ -442,7 +442,6 @@ libdir = env; if ((env = getenv("MPAGE")) != NULL) { - strcpy(copy, env); if ((copy = strdup(env)) == NULL) { fprintf(stderr, "%s: Unable to alloc memory for environment args\n", MPAGE); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message