Public bug reported:

Binary package hint: rsync

When trying to rsync a file with a very long filepath (in this case, it was 
2503 characters), rsync fails with error:
buffer overflow expanding %L -- exiting
rsync error: errors with program diagnostics (code 13) at log.c(651) 
[sender=2.6.9]

This is because the file path buffer is defined in rsync.h as:
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif

/* We want a roomy line buffer that can hold more than MAXPATHLEN,
 * and significantly more than an overly short MAXPATHLEN. */
#if MAXPATHLEN < 4096
#define BIGPATHBUFLEN (4096+1024)
#else
#define BIGPATHBUFLEN (MAXPATHLEN+1024)
#endif

If it were defined to use PATH_MAX from limits.h, as MAXPATHLEN, then it
would be safe for path lengths upto 4096 (as currently defined in
limits.h)

ProblemType: Bug
Architecture: amd64
Date: Tue Oct  7 11:04:21 2008
DistroRelease: Ubuntu 8.04
NonfreeKernelModules: nvidia
Package: rsync 2.6.9-6ubuntu2
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 
PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_GB.UTF-8
SourcePackage: rsync
Uname: Linux 2.6.24-19-generic x86_64

** Affects: rsync (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug

-- 
rsync does not implement PATH_MAX for large file paths
https://bugs.launchpad.net/bugs/279557
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to