[ftp] Fix linelen patch

jsynacek jsynacek at fedoraproject.org
Tue Oct 30 07:13:06 UTC 2012


commit 445d297f37a6bf6f45014b192bdca98ff11aac01
Author: Jan Synacek <jsynacek at redhat.com>
Date:   Tue Oct 30 08:12:52 2012 +0100

    Fix linelen patch
    
    Resolves: #871290

 ftp.spec                      |    6 +++++-
 netkit-ftp-0.17-linelen.patch |   31 +++++++++++++++++++++----------
 2 files changed, 26 insertions(+), 11 deletions(-)
---
diff --git a/ftp.spec b/ftp.spec
index 63cacd7..cbdd8df 100644
--- a/ftp.spec
+++ b/ftp.spec
@@ -1,7 +1,7 @@
 Summary: The standard UNIX FTP (File Transfer Protocol) client
 Name: ftp
 Version: 0.17
-Release: 61%{?dist}
+Release: 62%{?dist}
 License: BSD with advertising
 Group: Applications/Internet
 Source0: ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/netkit-ftp-%{version}.tar.gz
@@ -113,6 +113,10 @@ make INSTALLROOT=${RPM_BUILD_ROOT} install
 %{_mandir}/man5/netrc.*
 
 %changelog
+* Tue Oct 30 2012 Jan Synáček <jsynacek at redhat.com> - 0.17-62
+- Fix linelen patch
+- Resolves: #871290
+
 * Wed Oct 03 2012 Jan Synáček <jsynacek at redhat.com> - 0.17-61
 - Fix: FTP client does not expand home directory correctly after sudo or su
 - Resolves: #861113
diff --git a/netkit-ftp-0.17-linelen.patch b/netkit-ftp-0.17-linelen.patch
index f077f6a..2e80a3f 100644
--- a/netkit-ftp-0.17-linelen.patch
+++ b/netkit-ftp-0.17-linelen.patch
@@ -1,22 +1,33 @@
---- netkit-ftp-0.17-dist/ftp/ftp_var.h	2012-08-01 14:25:10.627248809 +0200
-+++ netkit-ftp-0.17-new/ftp/ftp_var.h	2012-08-01 14:29:51.756774406 +0200
-@@ -42,6 +42,7 @@
+--- netkit-ftp-0.17-dist/ftp/ftp_var.h	2012-10-29 10:02:44.455342130 +0100
++++ netkit-ftp-0.17-new/ftp/ftp_var.h	2012-10-29 10:02:31.292342775 +0100
+@@ -54,6 +54,7 @@
+ #define Extern extern
+ #endif
  
- #include <setjmp.h>
- #include <sys/param.h>
-+#include <limits.h>
- #define NTRANS_MAX	64
++#define LINELEN PATH_MAX+200
  
  /*
-@@ -108,9 +109,9 @@ Extern int	ftp_port;	/* htons'd port num
+  * Options and other state info.
+@@ -109,9 +110,9 @@ Extern int	ftp_port;	/* htons'd port num
  
  Extern sigjmp_buf toplevel;	/* non-local goto stuff for cmd scanner */
  
 -Extern char	line[200];	/* input line buffer */
-+Extern char	line[PATH_MAX + 200];	/* input line buffer */
++Extern char	line[LINELEN];	/* input line buffer */
  Extern char	*stringbase;	/* current scan point in line buffer */
 -Extern char	argbuf[200];	/* argument storage buffer */
-+Extern char	argbuf[PATH_MAX + 200];	/* argument storage buffer */
++Extern char	argbuf[LINELEN];	/* argument storage buffer */
  Extern char	*argbase;	/* current storage point in arg buffer */
  Extern int	cpend;		/* flag: if != 0, then pending server reply */
  Extern int	mflag;		/* flag: if != 0, then active multi command */
+--- netkit-ftp-0.17/ftp/domacro.c	2012-10-29 10:02:44.394342130 +0100
++++ netkit-ftp-0.17-new/ftp/domacro.c	2012-10-29 10:02:31.292342775 +0100
+@@ -53,7 +53,7 @@ domacro(int argc, char *argv[])
+ 	register int i, j;
+ 	register char *cp1, *cp2;
+ 	int count = 2, loopflg = 0;
+-	char line2[200];
++	char line2[LINELEN];
+ 	struct cmd *c;
+ 
+ 	if (argc < 2 && !another(&argc, &argv, "macro name")) {


More information about the scm-commits mailing list