[Bug 279557] Re: rsync does not implement PATH_MAX for large file paths
Serge Hallyn
279557 at bugs.launchpad.net
Thu Mar 6 04:49:25 UTC 2014
Looking at the source, limits.h is being included, so I believe this is
fixed in rsync.
** Changed in: rsync (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rsync in Ubuntu.
https://bugs.launchpad.net/bugs/279557
Title:
rsync does not implement PATH_MAX for large file paths
Status in “rsync” package in Ubuntu:
Fix Released
Bug description:
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rsync/+bug/279557/+subscriptions
More information about the foundations-bugs
mailing list