From matthias.andree@web.de  Fri Nov 21 05:14:28 2003
Return-Path: <matthias.andree@web.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 0788216A4CE; Fri, 21 Nov 2003 05:14:28 -0800 (PST)
Received: from nx5.hrz.uni-dortmund.de (nx5.HRZ.Uni-Dortmund.DE [129.217.131.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id ABC4943FCB; Fri, 21 Nov 2003 05:14:24 -0800 (PST)
	(envelope-from matthias.andree@web.de)
Received: from unimail.uni-dortmund.de (mx1.HRZ.Uni-Dortmund.DE [129.217.128.51])
	by nx5.hrz.uni-dortmund.de (Postfix) with ESMTP
	id 89D024AC4DA; Fri, 21 Nov 2003 14:14:23 +0100 (MET)
Received: from m2a2.myip.org (pD951FD42.dip.t-dialin.net [217.81.253.66])
	(authenticated (0 bits))
	by unimail.uni-dortmund.de (8.12.10+Sun/8.11.6) with ESMTP id hALDDuf7013180;
	Fri, 21 Nov 2003 14:13:56 +0100 (MET)
Received: by merlin.emma.line.org (Postfix, from userid 1001)
	id 645C71B929; Fri, 21 Nov 2003 14:13:55 +0100 (CET)
Message-Id: <20031121131355.645C71B929@merlin.emma.line.org>
Date: Fri, 21 Nov 2003 14:13:55 +0100 (CET)
From: Matthias Andree <matthias.andree@gmx.de>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: dinoex@FreeBSD.org, chris@scary.beasts.org
Subject: [PATCH] ftp/vsftpd: printf format string bug fix
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         59546
>Category:       ports
>Synopsis:       [PATCH] ftp/vsftpd: printf format string bug fix
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    dinoex
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 21 05:20:13 PST 2003
>Closed-Date:    Fri Nov 21 16:11:19 CET 2003
>Last-Modified:  Fri Nov 21 16:11:19 CET 2003
>Originator:     Matthias Andree
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD merlin.emma.line.org 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Mon Nov  3 14:56:20 CET
>Description:
vsftpd 1.2.1 uses %030ld to print a time_t argument. This fails on machines that don't use long for time_t,
some might use long long. The patch below explicitly casts the argument to the proper type.

NOTE: THIS SHOULD BECOME PART OF FREEBSD 5.2, SO PLEASE DO COMMIT IN SPITE OF THE PORTS FREEZE!

Chris, you'll need to patch once to get the real patch, then run patch with the newly created file to patch
your source.

Port and upstream maintainer (dinoex@FreeBSD.org, chris@scary.beasts.org) are cc'd.

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- vsftpd-1.2.1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/ftp/vsftpd/files/patch-sysutil-time_t-long /usr/home/emma/port-vsftpd/files/patch-sysutil-time_t-long
--- /usr/ports/ftp/vsftpd/files/patch-sysutil-time_t-long	Thu Jan  1 01:00:00 1970
+++ /usr/home/emma/port-vsftpd/files/patch-sysutil-time_t-long	Fri Nov 21 13:50:26 2003
@@ -0,0 +1,11 @@
+--- sysutil.c~	Tue Nov 11 02:37:16 2003
++++ sysutil.c	Fri Nov 21 13:47:12 2003
+@@ -1403,7 +1403,7 @@
+    * more recent dates appear later in the alphabet! Most notably, we must
+    * make sure we pad to the same length with 0's 
+    */
+-  snprintf(intbuf, sizeof(intbuf), "%030ld", p_stat->st_mtime);
++  snprintf(intbuf, sizeof(intbuf), "%030ld", (long)p_stat->st_mtime);
+   return intbuf;
+ }
+ 
--- vsftpd-1.2.1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->dinoex  
Responsible-Changed-By: krion 
Responsible-Changed-When: Fri Nov 21 05:52:22 PST 2003 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59546 
State-Changed-From-To: open->closed 
State-Changed-By: dinoex 
State-Changed-When: Fri Nov 21 16:11:08 CET 2003 
State-Changed-Why:  
committed, thanks. 

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