rsync
rsync copied to clipboard
Rsync crashes with ***buffer overflow detected***
I'm running into this error with rsync version 3.2.7 protocol version 31:
source_path=/nix/store/33qrk92qb8zhfnj85c7gn0lb51i6ysca-source
if test -d "$source_path"; then
source_path=$source_path/
fi
/nix/store/i9dgn6ymv732q5gzw669y6y9zxsv3x2z-rsync-3.2.7/bin/rsync \
--verbose \
-e ssh\ -l\ root\ -T \
-FD \
--checksum \
--times \
--perms \
--recursive \
--links \
--delete-excluded \
--mkpath \
\
$source_path root\@ahorn:/var/src/lollypops
sending incremental file list
*** buffer overflow detected ***: terminated
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(231) [Receiver=3.2.7]
Have not been able to find the cause so I suspect this is a bug?
Probably related to #511. It seems to impact nixpkgs-unstable.
I assume that this is the issue fixed in 3.3.0pre1 related to a memory change in newer popt releases. You can bypass it by either using --with-included-popt when you run configure or updating to the pre1 tar file. I'm going to get 3.3.0 released soon. Sorry for the huge delay.
I would recommend using the git version, since there's also fix around the use of strlcpy() that triggers an issue with _FORTIFY_SOURCE (it's just complaining about a too-large strlcpy() limit, even though no overflow is possible).