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

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