From ssedov@mbsd.msk.ru  Sun Aug  6 10:00:47 2006
Return-Path: <ssedov@mbsd.msk.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 74E0816A4DD;
	Sun,  6 Aug 2006 10:00:47 +0000 (UTC)
	(envelope-from ssedov@mbsd.msk.ru)
Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CC38B43D49;
	Sun,  6 Aug 2006 10:00:45 +0000 (GMT)
	(envelope-from ssedov@mbsd.msk.ru)
Received: from [217.118.83.1] (helo=fonon.realnet)
	by com1.ht-systems.ru with esmtpa (Exim 4.62)
	(envelope-from <ssedov@mbsd.msk.ru>)
	id 1G9fR0-0003qn-Nv; Sun, 06 Aug 2006 14:00:43 +0400
Received: by fonon.realnet (Postfix, from userid 1001)
	id 1717D120CA; Sun,  6 Aug 2006 14:00:21 +0400 (MSD)
Message-Id: <20060806100021.1717D120CA@fonon.realnet>
Date: Sun,  6 Aug 2006 14:00:21 +0400 (MSD)
From: Stanislav Sedov <ssedov@mbsd.msk.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: cy@FreeBSD.org
Subject: [PATCH] misc/screen: fix overflow on 64-bit
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         101459
>Category:       ports
>Synopsis:       [PATCH] misc/screen: fix overflow on 64-bit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    cy
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 06 10:10:08 GMT 2006
>Closed-Date:    Fri Apr 20 22:45:46 GMT 2007
>Last-Modified:  Fri Apr 20 22:45:46 GMT 2007
>Originator:     Stanislav Sedov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
MBSD labs, Inc.
>Environment:
System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Aug  2 21:44:37 MSD
>Description:
- Fix overflow on 64-bit platforms (ut_time is int32_t and time_t is of platform-dependent length)
- Add missing includes to avoid warnings

The following files was added:
- files/patch-layer.c
- files/patch-screen.c
- files/patch-utmp.c

Copy of this message was sent to (cy@FreeBSD.org).

>How-To-Repeat:
>Fix:

--- screen-4.0.2_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/misc/screen/Makefile /var/tmp/screen/Makefile
--- /usr/ports/misc/screen/Makefile	Mon Jul 19 11:21:17 2004
+++ /var/tmp/screen/Makefile	Sun Aug  6 13:45:15 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	screen
 PORTVERSION=	4.0.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	misc
 MASTER_SITES=	ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \
 		${MASTER_SITE_GNU}
diff -ruN --exclude=CVS /usr/ports/misc/screen/files/patch-layer.c /var/tmp/screen/files/patch-layer.c
--- /usr/ports/misc/screen/files/patch-layer.c	Thu Jan  1 03:00:00 1970
+++ /var/tmp/screen/files/patch-layer.c	Sun Aug  6 13:55:10 2006
@@ -0,0 +1,10 @@
+--- layer.c.orig	Mon Sep  8 18:25:46 2003
++++ layer.c	Sun Aug  6 13:54:40 2006
+@@ -22,6 +22,7 @@
+  */
+ 
+ #include <sys/types.h>
++#include <string.h>
+ 
+ #include "config.h"
+ #include "screen.h"
diff -ruN --exclude=CVS /usr/ports/misc/screen/files/patch-screen.c /var/tmp/screen/files/patch-screen.c
--- /usr/ports/misc/screen/files/patch-screen.c	Thu Jan  1 03:00:00 1970
+++ /var/tmp/screen/files/patch-screen.c	Sun Aug  6 13:56:14 2006
@@ -0,0 +1,10 @@
+--- screen.c.orig	Sun Aug  6 13:55:39 2006
++++ screen.c	Sun Aug  6 13:56:00 2006
+@@ -32,6 +32,7 @@
+ 
+ #include <sys/types.h>
+ #include <ctype.h>
++#include <string.h>
+ 
+ #include <fcntl.h>
+ 
diff -ruN --exclude=CVS /usr/ports/misc/screen/files/patch-utmp.c /var/tmp/screen/files/patch-utmp.c
--- /usr/ports/misc/screen/files/patch-utmp.c	Thu Jan  1 03:00:00 1970
+++ /var/tmp/screen/files/patch-utmp.c	Sun Aug  6 13:49:17 2006
@@ -0,0 +1,11 @@
+--- utmp.c.orig	Sun Aug  6 13:48:54 2006
++++ utmp.c	Sun Aug  6 13:49:14 2006
+@@ -618,7 +618,7 @@
+ #endif /* sgi */
+   strncpy(u->ut_line, line, sizeof(u->ut_line));
+   u->ut_pid = pid;
+-  (void)time((time_t *)&u->ut_time);
++  u->ut_time = time(NULL);
+ }
+ 
+ static slot_t
--- screen-4.0.2_2.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->cy 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 6 10:22:12 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101459 
State-Changed-From-To: open->feedback 
State-Changed-By: rafan 
State-Changed-When: Sun Aug 6 10:22:23 UTC 2006 
State-Changed-Why:  
Please generate diff that against the latest version (4.0.2_4) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101459 

From: Stanislav Sedov <ssedov@mbsd.msk.ru>
To: Rong-En Fan <rafan@FreeBSD.org>, cy@freebsd.org,
 bug-followup@freebsd.org <bug-followup@freebsd.org>
Cc:  
Subject: Re: ports/101459: [PATCH] misc/screen: fix overflow on 64-bit
Date: Sun, 6 Aug 2006 14:37:21 +0400

 On Sun, 6 Aug 2006 10:22:33 GMT
 Rong-En Fan <rafan@FreeBSD.org> mentioned:
 
 > Synopsis: [PATCH] misc/screen: fix overflow on 64-bit
 >=20
 > State-Changed-From-To: open->feedback
 > State-Changed-By: rafan
 > State-Changed-When: Sun Aug 6 10:22:23 UTC 2006
 > State-Changed-Why:=20
 > Please generate diff that against the latest version (4.0.2_4)
 >=20
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D101459
 >=20
 >=20
 
 Sorry for the noise, it was already fixed... I've missed
 that this port was moved and spent good 4 hours looking
 for the problem solution of already-solved problem :-(
 
 --=20
 Stanislav Sedov         MBSD labs, Inc.         <ssedov@mbsd.msk.ru>
 =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1         http://mbsd.msk.ru
 
 --------------------------------------------------------------------
 If the facts don't fit the theory, change the facts.  -- A. Einstein
 --------------------------------------------------------------------
 PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581

From: Stanislav Sedov <ssedov@mbsd.msk.ru>
To: Rong-En Fan <rafan@FreeBSD.org>, cy@freebsd.org,
 bug-followup@freebsd.org <bug-followup@freebsd.org>
Cc:  
Subject: Re: ports/101459: [PATCH] misc/screen: fix overflow on 64-bit
Date: Sun, 6 Aug 2006 14:44:07 +0400

 --MP_8ZCMNFCVhxHIzsiY+Ts0.W6
 Content-Type: text/plain; charset=KOI8-R
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 On Sun, 6 Aug 2006 10:22:33 GMT
 Rong-En Fan <rafan@FreeBSD.org> mentioned:
 
 > Synopsis: [PATCH] misc/screen: fix overflow on 64-bit
 >=20
 > State-Changed-From-To: open->feedback
 > State-Changed-By: rafan
 > State-Changed-When: Sun Aug 6 10:22:23 UTC 2006
 > State-Changed-Why:=20
 > Please generate diff that against the latest version (4.0.2_4)
 >=20
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D101459
 >=20
 >=20
 
 Although, one of the patches meaningfull, so it could be committed
 to make the PR slightly useful ;-)
 
 --=20
 Stanislav Sedov         MBSD labs, Inc.         <ssedov@mbsd.msk.ru>
 =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1         http://mbsd.msk.ru
 
 --------------------------------------------------------------------
 If the facts don't fit the theory, change the facts.  -- A. Einstein
 --------------------------------------------------------------------
 PGP fingerprint:  F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581
 
 --MP_8ZCMNFCVhxHIzsiY+Ts0.W6
 Content-Type: text/x-patch; name=screen.diff
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment; filename=screen.diff
 
 diff -ruN /usr/ports/sysutils/screen/files/patch-layer.c screen/files/patch-layer.c
 --- /usr/ports/sysutils/screen/files/patch-layer.c	Thu Jan  1 03:00:00 1970
 +++ screen/files/patch-layer.c	Sun Aug  6 13:55:10 2006
 @@ -0,0 +1,10 @@
 +--- layer.c.orig	Mon Sep  8 18:25:46 2003
 ++++ layer.c	Sun Aug  6 13:54:40 2006
 +@@ -22,6 +22,7 @@
 +  */
 + 
 + #include <sys/types.h>
 ++#include <string.h>
 + 
 + #include "config.h"
 + #include "screen.h"
 diff -ruN /usr/ports/sysutils/screen/files/patch-screen.c screen/files/patch-screen.c
 --- /usr/ports/sysutils/screen/files/patch-screen.c	Thu Jan  1 03:00:00 1970
 +++ screen/files/patch-screen.c	Sun Aug  6 13:56:14 2006
 @@ -0,0 +1,10 @@
 +--- screen.c.orig	Sun Aug  6 13:55:39 2006
 ++++ screen.c	Sun Aug  6 13:56:00 2006
 +@@ -32,6 +32,7 @@
 + 
 + #include <sys/types.h>
 + #include <ctype.h>
 ++#include <string.h>
 + 
 + #include <fcntl.h>
 + 
 
 --MP_8ZCMNFCVhxHIzsiY+Ts0.W6--

From: Cy Schubert <Cy.Schubert@komquats.com>
To: bug-followup@FreeBSD.org, ssedov@mbsd.msk.ru
Cc:  
Subject: Re: ports/101459: [PATCH] misc/screen: fix overflow on 64-bit
Date: Thu, 11 Jan 2007 07:30:20 -0800

 I still don't understand the nature of the problem. Now that I have a 64 
 bit platform here, I would like to recreate the problem before committing 
 any patch.
 
 
 
 -- 
 Cheers,
 Cy Schubert <Cy.Schubert@komquats.com>
 FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org
 
 			e**(i*pi)+1=0
 
 
State-Changed-From-To: feedback->open 
State-Changed-By: pav 
State-Changed-When: Wed Mar 14 20:54:04 UTC 2007 
State-Changed-Why:  
Patch against latest version received 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101459 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Apr 20 22:45:42 UTC 2007 
State-Changed-Why:  
newer version already in the portstree so can this close. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101459 
>Unformatted:
