Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 2003 15:55:23 +0200
From:      Fredrik Lindberg <fredde@borg.cx>
To:        ports@FreeBSD.org
Subject:   yafc 1.0 port patch which fixes segfault
Message-ID:  <20030520135523.GA3465@borg.cx>

next in thread | raw e-mail | index | archive | help

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I've sent this mail to ports@freebsd.org because that is the email-address
which is setup as maintainer for this port.
If this is wrong, please forward this email to the right maintainer, thanks. 

To whom it might concern,
There is an annoying bug present in yafc 1.0,
as far as I could tell the author is aware of the bug and (probably) knows how
to fix it but no new release has been made
(at least not prior to today, 2003-05-20). 

The bug is very silly but causes yafc to segfault if you try to upload/download
a file which already is present on the target system.

yafc borg:/> put dump/foobar 
/usr/home/fredde/dump/foobar                                          
yafc borg:/> put dump/foobar                                        
Segmentation fault (core dumped)

To get to the point. I've attatched a patch which fixes this problem.
Perhaps somebody could include the patch in the yafc-1.0 port until the next
release of yafc.

Regards,
	Fredrik 

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="yafc.patch"

Common subdirectories: yafc-1.0.orig/src/ftp and yafc-1.0/src/ftp
diff -u yafc-1.0.orig/src/get.c yafc-1.0/src/get.c
--- yafc-1.0.orig/src/get.c	Tue May 20 15:22:28 2003
+++ yafc-1.0/src/get.c	Tue May 20 15:22:58 2003
@@ -279,7 +279,7 @@
 				e = xstrdup(ctime(&sb.st_mtime));
 				a = ask(ASKYES|ASKNO|ASKUNIQUE|ASKCANCEL|ASKALL|ASKRESUME,
 						ASKRESUME,
-						_("Local file '%s' exists\nLocal: %ld bytes, %sRemote: %ld bytes, %sOverwrite?"),
+						_("Local file '%s' exists\nLocal: %lld bytes, %sRemote: %ld bytes, %sOverwrite?"),
 						shortpath(dest, 42, gvLocalHomeDir),
 						sb.st_size, e ? e : "unknown date",
 						ftp_filesize(fi->path), ctime(&ft));
Common subdirectories: yafc-1.0.orig/src/libmhe and yafc-1.0/src/libmhe
diff -u yafc-1.0.orig/src/put.c yafc-1.0/src/put.c
--- yafc-1.0.orig/src/put.c	Tue May 20 15:22:29 2003
+++ yafc-1.0/src/put.c	Tue May 20 15:23:08 2003
@@ -217,7 +217,7 @@
 				e = xstrdup(ctime(&sb->st_mtime));
 				a = ask(ASKYES|ASKNO|ASKUNIQUE|ASKCANCEL|ASKALL|ASKRESUME,
 						ASKRESUME,
-						_("Remote file '%s' exists\nLocal: %ld bytes, %sRemote: %ld bytes, %sOverwrite?"),
+						_("Remote file '%s' exists\nLocal: %lld bytes, %sRemote: %ld bytes, %sOverwrite?"),
 						shortpath(dest, 42, ftp->homedir),
 						sb->st_size, e ? e : "unknown date",
 						ftp_filesize(f->path), ctime(&ft));

--a8Wt8u1KmwUX3Y2C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030520135523.GA3465>