Package: ftp
Version: 0.17-23

Using RESTart points > 4GB followed by a STORe command fails because
fseek() only takes long arguments instead of long long.

Here's the patch:

mort@p3g-3:~/src/netkit-ftp-0.17$ diff -u ftp/ftp.c.origt ftp/ftp.c
--- ftp/ftp.c.origt     2012-05-07 14:32:52.000000000 -0400
+++ ftp/ftp.c   2012-05-07 14:32:52.000000000 -0400
@@ -725,7 +725,7 @@

        if (restart_point &&
            (strcmp(cmd, "STOR") == 0 || strcmp(cmd, "APPE") == 0)) {
-               if (fseek(fin, restart_point, 0) < 0) {
+               if (lseek(fileno(fin), restart_point, L_SET) < 0) {
                        fprintf(stderr, "local: %s: %s\n", local,
                                strerror(errno));
                        restart_point = 0;


Found on i686, debian 6.0.3

mh

-- 
Martin Hicks P.Eng.      |         m...@bork.org
Bork Consulting Inc.     |   +1 (613) 266-2296

Reply via email to