Apply upstream fix for bug 181694

This commit is contained in:
jvdias 2006-02-16 16:46:46 +00:00
parent 9d79b6358f
commit 8aef34645f
2 changed files with 19 additions and 19 deletions

View File

@ -1,18 +1,11 @@
--- lftp-3.4.2/src/Http.cc.redirect_coredump 2006-02-06 05:57:25.000000000 -0500 --- lftp-3.4.2/src/FileAccess.cc.bz181694 2006-02-06 06:03:58.000000000 -0500
+++ lftp-3.4.2/src/Http.cc 2006-02-15 16:19:23.000000000 -0500 +++ lftp-3.4.2/src/FileAccess.cc 2006-02-16 11:34:44.000000000 -0500
@@ -1525,6 +1525,15 @@ @@ -690,7 +690,7 @@
}
if(mode==CHANGE_DIR) void FileAccess::PathVerify(const Path &p)
{ {
+ if( new_cwd == 0L ) - delete new_cwd;
+ { + Close();
+ char *new_location = xstrdup(GetConnectURL()); new_cwd=new Path(p);
+ xfree(location); Open(new_cwd->path,CHANGE_DIR);
+ location=new_location; }
+ SetError(FILE_MOVED);
+ state= DONE;
+ return MOVED;
+ }
cwd.Set(new_cwd);
state=DONE;
return MOVED;

View File

@ -1,7 +1,7 @@
Summary: A sophisticated file transfer program Summary: A sophisticated file transfer program
Name: lftp Name: lftp
Version: 3.4.2 Version: 3.4.2
Release: 2 Release: 4
License: GPL License: GPL
Group: Applications/Internet Group: Applications/Internet
Source0: http://ftp.yars.free.net/lftp/lftp-%{version}.tar.bz2 Source0: http://ftp.yars.free.net/lftp/lftp-%{version}.tar.bz2
@ -13,6 +13,8 @@ Patch173276: lftp-3.3.5-bz173276.patch
Patch2: lftp-3.4.1-dont_core.patch Patch2: lftp-3.4.1-dont_core.patch
Patch181694: lftp-3.4.2-fix-redirect-coredump.patch Patch181694: lftp-3.4.2-fix-redirect-coredump.patch
#%define debug_package %{nil}
%description %description
LFTP is a sophisticated ftp/http file transfer program. Like bash, it has job LFTP is a sophisticated ftp/http file transfer program. Like bash, it has job
control and uses the readline library for input. It has bookmarks, built-in control and uses the readline library for input. It has bookmarks, built-in
@ -47,6 +49,8 @@ chmod 0755 $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.so
# Remove files from $RPM_BUILD_ROOT that we aren't shipping. # Remove files from $RPM_BUILD_ROOT that we aren't shipping.
rm -f $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.a
%find_lang %{name} %find_lang %{name}
#/usr/lib/rpm/brp-compress
#exit 0
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -73,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lftp/%{version}/proto-sftp.so %{_libdir}/lftp/%{version}/proto-sftp.so
%changelog %changelog
* Thu Feb 16 2006 Jason Vas Dias<jvdias@redhat.com> - 3.4.2-4
- Apply upstream fix for bug 181694.
* Wed Feb 15 2006 Jason Vas Dias<jvdias@redhat.com> - 3.4.2-2 * Wed Feb 15 2006 Jason Vas Dias<jvdias@redhat.com> - 3.4.2-2
- fix bug 181694: segfault on redirection to non-existent location - fix bug 181694: segfault on redirection to non-existent location