Fix linelen patch

Resolves: #871290
This commit is contained in:
Jan Synacek 2012-10-30 08:12:52 +01:00
parent c75973b948
commit 445d297f37
2 changed files with 26 additions and 11 deletions

View File

@ -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@redhat.com> - 0.17-62
- Fix linelen patch
- Resolves: #871290
* Wed Oct 03 2012 Jan Synáček <jsynacek@redhat.com> - 0.17-61
- Fix: FTP client does not expand home directory correctly after sudo or su
- Resolves: #861113

View File

@ -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")) {