ports/59546: [PATCH] ftp/vsftpd: printf format string bug fix

Matthias Andree matthias.andree at gmx.de
Fri Nov 21 13:20:15 UTC 2003


>Number:         59546
>Category:       ports
>Synopsis:       [PATCH] ftp/vsftpd: printf format string bug fix
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 21 05:20:13 PST 2003
>Closed-Date:
>Last-Modified:
>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 at FreeBSD.org, chris at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list