$OpenBSD: patch-kioslave_ftp_ftp_cc,v 1.1 2005/02/27 07:42:03 brad Exp $
--- kioslave/ftp/ftp.cc.orig	Sun Feb 27 02:35:57 2005
+++ kioslave/ftp/ftp.cc	Sun Feb 27 02:36:44 2005
@@ -751,6 +751,14 @@ bool Ftp::ftpSendCmd( const QCString& cm
 {
   assert(m_control != NULL);    // must have control connection socket
 
+  if ( cmd.find( '\r' ) != -1 || cmd.find( '\n' ) != -1)
+  {
+    kdWarning(7102) << "Invalid command received (contains CR or LF): "
+                    << cmd.data() << endl;
+    error( ERR_UNSUPPORTED_ACTION, m_host );
+    return false;
+  }
+
   // Don't print out the password...
   bool isPassCmd = (cmd.left(4).lower() == "pass");
   if ( !isPassCmd )
