diff options
Diffstat (limited to 'net-fs/davfs2/files/davfs2-cvs1.0.2-badpointer.patch')
-rw-r--r-- | net-fs/davfs2/files/davfs2-cvs1.0.2-badpointer.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/net-fs/davfs2/files/davfs2-cvs1.0.2-badpointer.patch b/net-fs/davfs2/files/davfs2-cvs1.0.2-badpointer.patch new file mode 100644 index 000000000000..f2b75a47c83b --- /dev/null +++ b/net-fs/davfs2/files/davfs2-cvs1.0.2-badpointer.patch @@ -0,0 +1,63 @@ +diff -Naur davfs2/src/cache.c davfs2-new/src/cache.c +--- davfs2/src/cache.c 2006-08-21 22:51:51.000000000 +0200 ++++ davfs2-new/src/cache.c 2006-09-17 10:29:06.720200399 +0200 +@@ -236,7 +236,7 @@ + + static int is_busy(const dav_node *node); + +-static inline int is_cached(const dav_node *node) { ++static inline int is_cached(dav_node *node) { + + if (!S_ISREG(node->mode) || node->cache_path == NULL) + return 0; +@@ -244,6 +244,7 @@ + return 1; + } else { + free(node->cache_path); ++ node->cache_path = NULL; + return 0; + } + } +@@ -299,6 +300,8 @@ + + static inline void set_cache_file_times(dav_node *node) { + ++ if (node->cache_path == NULL) ++ return; + struct utimbuf t; + t.actime = node->atime; + t.modtime = node->mtime; +@@ -1790,6 +1793,7 @@ + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), + "Error %i creating: %s", errno, node->cache_path); + free(node->cache_path); ++ node->cache_path = NULL; + return EIO; + } + +@@ -1817,6 +1821,7 @@ + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), + "Error %i creating: %s", errno, node->cache_path); + free(node->cache_path); ++ node->cache_path = NULL; + return EIO; + } + +@@ -1839,6 +1844,7 @@ + "Error writing directory %s", node->cache_path); + remove(node->cache_path); + free(node->cache_path); ++ node->cache_path = NULL; + return EIO; + } + } +@@ -1973,7 +1979,7 @@ + + struct stat st; + if (stat(index, &st) == 0) { +- blocksize = st.st_blksize; ++ blocksize = (st.st_blksize > 4096) ? 4096 : st.st_blksize; + } else { + blocksize = 1024; + } + |