Mark Hills <[email protected]> writes: > I'm trying to use rcp, unsuccessfully. Whether using local or remote > files, small or large, I get the following errors: > > $ rcp aaaa m...@remote:bbbb > rcp: memory exhausted > > $ rcp aaaa bbbb > rcp: memory exhausted > > The output when running through strace is attached. Seems that the problem > occurs before any network connection is attempted, which makes me thing > this is a bug, and not me mis-understanding a logical error message.
Thanks for the report. I confirm the bug. I have attached the fix I will push, if there are no objections. Cheers, Giuseppe >From 20b0ce22938f87daf7a0ff605926e13af04f3cee Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano <[email protected]> Date: Tue, 11 May 2010 19:59:31 +0200 Subject: [PATCH] Change the test to check if the call to `asprintf' failed. --- ChangeLog | 5 +++++ src/rcp.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7461ddb..36da17b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-11 Giuseppe Scrivano <[email protected]> + + * src/rcp.c (main): Change the test to check if the call to + `asprintf' failed. + 2010-05-04 Giuseppe Scrivano <[email protected]> * bootstrap: Update to the last gnulib version. diff --git a/src/rcp.c b/src/rcp.c index ce7e058..fa92d02 100644 --- a/src/rcp.c +++ b/src/rcp.c @@ -333,7 +333,7 @@ main (int argc, char *argv[]) iamrecursive ? " -r" : "", preserve_option ? " -p" : "", targetshouldbedirectory ? " -d" : ""); #endif - if (rc) + if (rc < 0) xalloc_die (); rem = -1; -- 1.7.0
