yafc 1.0 port patch which fixes segfault

Fredrik Lindberg fredde at borg.cx
Tue May 20 06:55:31 PDT 2003


I've sent this mail to ports at 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 
-------------- next part --------------
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));


More information about the freebsd-ports mailing list