[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] proftpd/modules mod_xfer.c, 1.297.2.3, 1.297.2.4
From:       TJ Saunders <castaglia () users ! sourceforge ! net>
Date:       2014-04-28 17:06:24
Message-ID: E1Wep0c-0005RO-2b () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/modules
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30048/modules

Modified Files:
      Tag: B1_3_4
	mod_xfer.c 
Log Message:

Backport of fix for Bug#4046 to 1.3.4 branch.


Index: mod_xfer.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/mod_xfer.c,v
retrieving revision 1.297.2.3
retrieving revision 1.297.2.4
diff -u -d -r1.297.2.3 -r1.297.2.4
--- mod_xfer.c	15 Sep 2013 19:37:24 -0000	1.297.2.3
+++ mod_xfer.c	28 Apr 2014 17:06:22 -0000	1.297.2.4
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver@tos.net>
- * Copyright (c) 2001-2011 The ProFTPD Project team
+ * Copyright (c) 2001-2014 The ProFTPD Project team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -2372,10 +2372,14 @@
         path, strerror(errno));
 
     } else {
-      if (requested_sz > avail_sz) {
+
+      /* The requested size is in bytes; the size returned from
+       * pr_fs_getsize2() is in KB.
+       */
+      if (requested_sz > (avail_sz * 1024)) {
         pr_log_debug(DEBUG5, "%s requested %" PR_LU " bytes, only %" PR_LU
           " bytes available on '%s'", cmd->argv[0], (pr_off_t) requested_sz,
-          (pr_off_t) avail_sz, path);
+          (pr_off_t) (avail_sz * 1024), path);
         pr_response_add_err(R_552, "%s: %s", cmd->arg, strerror(ENOSPC));
         return PR_ERROR(cmd);
       }


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic