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

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