From fe45df2ccfe43077d15c31e21f00f4fb98eea85c Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 7 May 2009 15:17:06 +0200 Subject: [PATCH] FTP: parse file sizes > 4GB correctly Use 64-bit strtoull() instead of 32-bit strtoul() when converting string to number. https://bugzilla.redhat.com/show_bug.cgi?id=499286 --- daemon/gvfsbackendftp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c index e650dd0..949573d 100644 --- a/daemon/gvfsbackendftp.c +++ b/daemon/gvfsbackendftp.c @@ -1239,7 +1239,7 @@ dir_default_iter_process (gpointer iter, else if (symlink) *symlink = NULL; - g_file_info_set_size (info, strtoul (result.fe_size, NULL, 10)); + g_file_info_set_size (info, g_ascii_strtoull (result.fe_size, NULL, 10)); gvfs_file_info_populate_default (info, s, type == 'f' ? G_FILE_TYPE_REGULAR : @@ -2231,7 +2231,7 @@ create_file_info (GVfsBackendFtp *ftp, FtpConnection *conn, const char *filename gvfs_file_info_populate_default (info, filename, G_FILE_TYPE_REGULAR); - g_file_info_set_size (info, strtoul (conn->read_buffer+4, NULL, 0)); + g_file_info_set_size (info, g_ascii_strtoull (conn->read_buffer+4, NULL, 0)); g_file_info_set_is_hidden (info, TRUE); } -- 1.6.2.2