From 52c6a66274f63de2fb423b881b4d58ca393df39e Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Mon, 19 May 2003 13:27:05 +0000 Subject: [PATCH] MFH(r-1.86): fixed bug #23683 --- ext/ftp/ftp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 646e99901c..34afd72e73 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -188,9 +188,11 @@ ftp_gc(ftpbuf_t *ftp) if (ftp->pwd) { efree(ftp->pwd); + ftp->pwd = NULL; } if (ftp->syst) { efree(ftp->syst); + ftp->syst = NULL; } } /* }}} */ @@ -210,6 +212,7 @@ ftp_quit(ftpbuf_t *ftp) if (ftp->pwd) { efree(ftp->pwd); + ftp->pwd = NULL; } return 1; @@ -389,9 +392,7 @@ ftp_pwd(ftpbuf_t *ftp) return NULL; if ((end = strrchr(++pwd, '"')) == NULL) return NULL; - *end = 0; - ftp->pwd = estrdup(pwd); - *end = '"'; + ftp->pwd = estrndup(pwd, end - pwd); return ftp->pwd; } -- 2.50.1