From 0dfb298f2f28de5bf340c2d9f66d272518810c5d Mon Sep 17 00:00:00 2001 From: hno <> Date: Tue, 18 Sep 2001 19:55:00 +0000 Subject: [PATCH] Fix for a segfault in ftp.c when only creating directories (PUT with a trailing slash and no filename, content-length == 0) --- src/ftp.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ftp.cc b/src/ftp.cc index 22b8c187f5..7741f0e3a2 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.310 2001/04/14 00:25:18 hno Exp $ + * $Id: ftp.cc,v 1.311 2001/09/18 13:55:00 hno Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -2458,8 +2458,10 @@ ftpSendReply(FtpStateData * ftpState) err->ftp.request = xstrdup(ftpState->ctrl.last_command); if (ftpState->old_reply) err->ftp.reply = xstrdup(ftpState->old_reply); - else + else if (ftpState->ctrl.last_reply) err->ftp.reply = xstrdup(ftpState->ctrl.last_reply); + else + err->ftp.reply = xstrdup(""); errorAppendEntry(ftpState->entry, err); storeBufferFlush(ftpState->entry); ftpSendQuit(ftpState); -- 2.47.2