Plug leaks in "put", "send", "append"

This commit is contained in:
Jan Synacek 2012-09-25 12:37:30 +02:00
parent e4ce6c5b89
commit 9dae303d10
2 changed files with 19 additions and 1 deletions

View File

@ -1,7 +1,7 @@
Summary: The standard UNIX FTP (File Transfer Protocol) client
Name: ftp
Version: 0.17
Release: 59%{?dist}
Release: 60%{?dist}
License: BSD with advertising
Group: Applications/Internet
Source0: ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/netkit-ftp-%{version}.tar.gz
@ -36,6 +36,7 @@ Patch27: netkit-ftp-0.17-acct_ovl.patch
Patch28: netkit-ftp-0.17-remove-nested-include.patch
Patch29: netkit-ftp-0.17-linelen.patch
Patch30: netkit-ftp-0.17-active-mode-option.patch
Patch31: netkit-ftp-0.17-commands-leaks.patch
BuildRequires: glibc-devel, readline-devel, ncurses-devel
@ -79,6 +80,7 @@ file transfers.
%patch28 -p1
%patch29 -p1 -b .linelen
%patch30 -p1 -b .activemode
%patch31 -p1 -b .cmds-leaks
%build
sh configure --with-c-compiler=gcc --enable-ipv6
@ -107,6 +109,9 @@ make INSTALLROOT=${RPM_BUILD_ROOT} install
%{_mandir}/man5/netrc.*
%changelog
* Tue Sep 25 2012 Jan Synáček <jsynacek@redhat.com> - 0.17-60
- Plug leaks in "put", "send", "append"
* Tue Aug 28 2012 Jan Synáček <jsynacek@redhat.com> - 0.17-59
- Add active mode option

View File

@ -0,0 +1,13 @@
diff -up netkit-ftp-0.17/ftp/cmds.c.orig netkit-ftp-0.17/ftp/cmds.c
--- netkit-ftp-0.17/ftp/cmds.c.orig 2011-09-05 14:41:34.000000000 +0200
+++ netkit-ftp-0.17/ftp/cmds.c 2011-09-05 14:44:44.000000000 +0200
@@ -499,6 +499,9 @@ usage:
}
sendrequest(cmd, argv[1], argv[2],
argv[1] != oldargv1 || argv[2] != oldargv2);
+ if (argv[1] != oldargv1) {
+ free(argv[1]);
+ }
}
void mabort(int);