Package: fusedav Version: 0.2-3 Severity: normal Tags: upstream lfs patch
The Content-Length header may represent values larger than a 32-bit integer, thus atoll() should be used instead of atoi(). This allows me to reliably read files larger than 2 gigabytes over WebDAV. -- System Information: Debian Release: 6.0.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages fusedav depends on: ii fuse-utils 2.8.4-1.1 Filesystem in USErspace (utilities ii libc6 2.11.3-4 Embedded GNU C Library: Shared lib ii libfuse2 2.8.4-1.1 Filesystem in USErspace library ii libneon27-gnutls 0.29.3-3 An HTTP and WebDAV client library fusedav recommends no packages. fusedav suggests no packages. -- no debconf information
>From 9753a633011caf66ce1f7f8a633c7e42df8fb152 Mon Sep 17 00:00:00 2001 From: Eric Wong <normalper...@yhbt.net> Date: Sun, 21 Oct 2012 01:25:27 -0700 Subject: [PATCH] filecache: parse large Content-Length properly atoi() returns a 32-bit signed value on most systems, preventing values over INT_MAX from being represented properly when reading/seeking a file. This truncation prevented large files from being read properly. --- src/filecache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filecache.c b/src/filecache.c index 189db27..2f1e36d 100644 --- a/src/filecache.c +++ b/src/filecache.c @@ -199,7 +199,7 @@ void* file_cache_open(const char *path, int flags) { /* dirty hack, since Apache doesn't send the file size if the file is empty */ fi->server_length = fi->length = 0; else - fi->server_length = fi->length = atoi(length); + fi->server_length = fi->length = (off_t)atoll(length); ne_request_destroy(req); -- 1.8.0.rc0.42.gb8c78e2