]> git.pld-linux.org Git - packages/ftp.git/commitdiff
- netkit-ftp-input_line.patch: fix behavior when the line entered is ftp-0_17-12
authorqrczak <qrczak@pld-linux.org>
Wed, 28 Nov 2001 17:58:10 +0000 (17:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  too long and we are using readline. Fix another bug when the line is
  too long, we are using readline, and the 199th character is '\n'.
- Release 12.

Changed files:
    ftp.spec -> 1.29
    netkit-ftp-input_line.patch -> 1.1

ftp.spec
netkit-ftp-input_line.patch [new file with mode: 0644]

index c6893a8be753416a6a09f87da6bc0b143add1d56..49181d167dc7c42a4b6ca9801f803062bcac9aeb 100644 (file)
--- a/ftp.spec
+++ b/ftp.spec
@@ -5,7 +5,7 @@ Summary(pl):    Standardowy klient ftp (file transfer protocol)
 Summary(tr):   Standart UN*X ftp istemcisi
 Name:          ftp
 Version:       0.17
-Release:       11
+Release:       12
 License:       BSD
 Group:         Applications/Networking
 Group(de):     Applikationen/Netzwerkwesen
@@ -15,6 +15,7 @@ Source1:      %{name}-non-english-man-pages.tar.bz2
 Patch0:                netkit-%{name}-macro-quit.patch
 Patch1:                netkit-%{name}-acct.patch
 Patch2:                netkit-%{name}-usagi-ipv6.patch
+Patch3:                netkit-%{name}-input_line.patch
 BuildRequires: readline-devel >= 4.2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     lukemftp
@@ -54,6 +55,7 @@ iletimi i
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 CFLAGS="%{rpmcflags}" \
diff --git a/netkit-ftp-input_line.patch b/netkit-ftp-input_line.patch
new file mode 100644 (file)
index 0000000..e95d7a2
--- /dev/null
@@ -0,0 +1,28 @@
+--- netkit-ftp-0.17/ftp/main.c~        Wed Nov 28 18:50:24 2001
++++ netkit-ftp-0.17/ftp/main.c Wed Nov 28 18:53:14 2001
+@@ -324,16 +324,19 @@
+               l = strlen(line);
+               if (l == 0)
+                       break;
+-              if (line[--l] == '\n') {
+-                      if (l == 0)
+-                              break;
+-                      line[l] = '\0';
+-              } 
+-              else if (l == sizeof(line) - 2) {
++              if (l == sizeof(line) - 1) {
+                       printf("sorry, input line too long\n");
++#ifdef __USE_READLINE__
++                      if (!(fromatty && !rl_inhibit))
++#endif
+                       while ((l = getchar()) != '\n' && l != EOF)
+                               /* void */;
+                       break;
++              }
++              if (line[--l] == '\n') {
++                      if (l == 0)
++                              break;
++                      line[l] = '\0';
+               } /* else it was a line without a newline */
+               margv = makeargv(&margc, &marg);
+               if (margc == 0) {
This page took 0.075522 seconds and 4 git commands to generate.