Blame SOURCES/netkit-ftp-0.17-makeargv-linelen.patch

728ed8
diff -up netkit-ftp-0.17/ftp/ftp.c.orig netkit-ftp-0.17/ftp/ftp.c
728ed8
diff -up netkit-ftp-0.17/ftp/ftp_var.h.orig netkit-ftp-0.17/ftp/ftp_var.h
728ed8
diff -up netkit-ftp-0.17/ftp/main.c.orig netkit-ftp-0.17/ftp/main.c
728ed8
--- netkit-ftp-0.17/ftp/main.c.orig	2018-09-03 16:49:16.459000000 +0200
728ed8
+++ netkit-ftp-0.17/ftp/main.c	2018-09-03 17:00:14.853452345 +0200
728ed8
@@ -399,7 +399,7 @@ int slrflag;
728ed8
 char **
728ed8
 makeargv(int *pargc, char **parg)
728ed8
 {
728ed8
-	static char *rargv[20];
728ed8
+	static char *rargv[LINELEN];
728ed8
 	int rargc = 0;
728ed8
 	char **argp;
728ed8
 
728ed8
@@ -407,7 +407,7 @@ makeargv(int *pargc, char **parg)
728ed8
 	stringbase = line;		/* scan from first of buffer */
728ed8
 	argbase = argbuf;		/* store from first of buffer */
728ed8
 	slrflag = 0;
728ed8
-	while ((*argp++ = slurpstring())!=NULL)
728ed8
+	while ((rargc < LINELEN) && (*argp++ = slurpstring())!=NULL)
728ed8
 		rargc++;
728ed8
 
728ed8
 	*pargc = rargc;