Fix integer overrun

This commit is contained in:
wbaumann 2012-03-11 15:40:32 +00:00
parent 793ef7060f
commit 459a6c9bdf
3 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,10 @@
ChangeLog for davfs2
--------------------

2012-03-1 Werner Baumann (werner.baumann@onlinehome.de)
* webdav.c, dav_init_cache:
Fix integer overrun.

2012-02-05 Werner Baumann (werner.baumann@onlinehome.de)
* mount_davfs.c, mount_davfs.h, webdav.c:
Read client certificates in mount_davfs.c.

2
NEWS
View File

@ -13,7 +13,7 @@ some other system than standard GNU/Linux and encouter problems please
file an support request. Many of these problem should be sovable by
importing additional Gnulib modules.

No longer check for somone esles home directory.
No longer check for somone elses home directory.

TODO


View File

@ -202,10 +202,10 @@ static char *cache_dir;

/* Maximum cache size. If open files require more space, this will
be ignored. */
unsigned long long max_cache_size;
static unsigned long long max_cache_size;

/* Actual cache size. */
unsigned long long cache_size;
static unsigned long long cache_size;

/* Alignment boundary of dav_node in byte.
Used to compute a hash value and file numbers from node pointers. */
@ -633,7 +633,7 @@ dav_init_cache(const dav_args *args, const char *mpoint)

if (debug)
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Checking cache directory");
max_cache_size = args->cache_size * 0x100000;
max_cache_size = (unsigned long long) args->cache_size * 0x100000;
check_cache_dir(args->cache_dir, args->host, args->path, mpoint);
if (debug)
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), " %s", cache_dir);