On Sat, 24 Dec 2011, Elli? Computing Open Source Program wrote:

new_readdir_line = realloc(sshc->readdir_line,
                                sshc->readdir_totalLen + 4 +
                                sshc->readdir_len);

at line 1890, the total length ?sshc->readdir_totalLen? is not updated...
hence it worked with the PATH_MAX value... better than that simply add the
line:

sshc->readdir_totalLen += 4 + sshc->readdir_len;

Oh, right. To be sure I don't misunderstand, can you post us a proper patch
with this change so that it gets done on the correct place?

here is the result of git format-patch -1

From 57e8e51189be461fcf9a9ad1bcf2eddc26f0f19d Mon Sep 17 00:00:00 2001
From: Armel Asselin <Armel@.(none)>
Date: Mon, 26 Dec 2011 17:45:33 +0100
Subject: [PATCH] fixed total length after read link

---
lib/ssh.c |    1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/ssh.c b/lib/ssh.c
index 23ba5f4..daa66e1 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -1900,6 +1900,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
        break;
      }
      sshc->readdir_line = new_readdir_line;
+      sshc->readdir_totalLen += 4 + sshc->readdir_len;

      sshc->readdir_currLen += snprintf(sshc->readdir_line +
                                        sshc->readdir_currLen,
--
1.6.5.1.1367.gcd48


Regards
Armel Asselin


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to