diff options
Diffstat (limited to 'debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch')
| -rw-r--r-- | debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch b/debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch new file mode 100644 index 00000000..086f5c3a --- /dev/null +++ b/debian/patches/0001-ftpfs-fix-error-handling-in-refresh_dir.patch @@ -0,0 +1,46 @@ +From 94e684b35dd5455e1cb4ac5e5f2aab2df0ebb2db Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Wed, 20 Nov 2013 11:58:41 +0100 +Subject: [PATCH 1/5] ftpfs: fix error handling in refresh_dir + +Found using the Clang Static Analyzer. + +* ftpfs/dir.c (refresh_dir): Fix error handling. +--- + ftpfs/dir.c | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/ftpfs/dir.c b/ftpfs/dir.c +index da5ddbe..a9fea22 100644 +--- a/ftpfs/dir.c ++++ b/ftpfs/dir.c +@@ -384,14 +384,18 @@ refresh_dir (struct ftpfs_dir *dir, int update_stats, time_t timestamp, + if (! err) + err = update_ordered_name ("..", &dfs); + +- /* Refetch the directory from the server. */ +- if (update_stats) +- /* Fetch both names and stat info. */ +- err = ftp_conn_get_stats (conn, dir->rmt_path, 1, +- update_ordered_entry, &dfs); +- else +- /* Just fetch names. */ +- err = ftp_conn_get_names (conn, dir->rmt_path, update_ordered_name, &dfs); ++ if (! err) ++ { ++ /* Refetch the directory from the server. */ ++ if (update_stats) ++ /* Fetch both names and stat info. */ ++ err = ftp_conn_get_stats (conn, dir->rmt_path, 1, ++ update_ordered_entry, &dfs); ++ else ++ /* Just fetch names. */ ++ err = ftp_conn_get_names (conn, dir->rmt_path, ++ update_ordered_name, &dfs); ++ } + + if (! err) + /* GC any directory entries that weren't seen this time. */ +-- +2.0.0 + |
