diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2009-05-07 15:17:06 +0200 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2009-05-07 15:17:06 +0200 |
commit | fe45df2ccfe43077d15c31e21f00f4fb98eea85c (patch) | |
tree | 2bedaafcb82fcae6abd7c7e20dc317529955431a | |
parent | f73de6140a0b52acbaf1406075df227ef42cb8af (diff) | |
download | gvfs-fe45df2ccfe43077d15c31e21f00f4fb98eea85c.tar.gz |
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
-rw-r--r-- | daemon/gvfsbackendftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c index e650dd04..949573da 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); } |