From bebc2e4873baffc06b103025156b85f64a4255c7 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Dec 13 2007 07:45:39 +0000 Subject: - Fixed coredumping when downloading (#414051) --- diff --git a/lftp-3.5.14-progress_overflow.patch b/lftp-3.5.14-progress_overflow.patch new file mode 100644 index 0000000..c924ed8 --- /dev/null +++ b/lftp-3.5.14-progress_overflow.patch @@ -0,0 +1,12 @@ +diff -up lftp-3.5.14/src/FileCopy.cc.test lftp-3.5.14/src/FileCopy.cc +--- lftp-3.5.14/src/FileCopy.cc.test 2007-12-11 09:48:03.000000000 +0100 ++++ lftp-3.5.14/src/FileCopy.cc 2007-12-11 09:48:36.000000000 +0100 +@@ -530,6 +530,6 @@ const char *FileCopy::GetPercentDoneStr( + return ""; +- static char buf[6]; ++ static char buf[8]; +- sprintf(buf,"(%d%%) ",pct); ++ snprintf(buf,8,"(%d%%) ",pct); + return buf; + } + float FileCopy::GetRate() diff --git a/lftp.spec b/lftp.spec index 08e876f..ac9b0ba 100644 --- a/lftp.spec +++ b/lftp.spec @@ -1,7 +1,7 @@ Summary: A sophisticated file transfer program Name: lftp Version: 3.5.14 -Release: 2.1%{?dist} +Release: 3%{?dist} License: GPL Group: Applications/Internet Source0: ftp://ftp.yar.ru/lftp/lftp-%{version}.tar.gz @@ -9,6 +9,8 @@ URL: http://lftp.yar.ru/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel, openssl-devel, pkgconfig, readline-devel, libtool, gettext +Patch1: lftp-3.5.14-progress_overflow.patch + %description 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 @@ -17,6 +19,7 @@ reliability in mind. %prep %setup -q +%patch1 -p1 -b .progress_overflow %build if pkg-config openssl ; then @@ -86,6 +89,9 @@ exit 0 %{_libdir}/liblftp-tasks* %changelog +* Tue Dec 13 2007 Martin Nagy - 3.5.14-3 +- Fixed coredumping when downloading (#414051) + * Tue Dec 04 2007 Martin Nagy - 3.5.14-2.1 - rebuild