bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] rcp: memory exhausted


From: Giuseppe Scrivano
Subject: Re: [bug-inetutils] rcp: memory exhausted
Date: Tue, 11 May 2010 20:02:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Mark Hills <address@hidden> writes:

> I'm trying to use rcp, unsuccessfully. Whether using local or remote 
> files, small or large, I get the following errors:
>
>   $ rcp aaaa address@hidden: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 <address@hidden>
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  <address@hidden>
+
+       * src/rcp.c (main): Change the test to check if the call to
+       `asprintf' failed.
+
 2010-05-04  Giuseppe Scrivano  <address@hidden>
 
        * 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]