Author: Jan Krueger <jast@heapsort.de> (by way of Kev <klmitch@mit.edu>)
[ircu2.10.12-pk.git] / ircd / s_bsd.c
index 3989ca0efa1acc021c27a7ed507d0a5ac5058290..ab7d2616b05218c63c08498cf009e7af84d9154b 100644 (file)
@@ -635,7 +635,13 @@ static int read_packet(struct Client *cptr, int socket_ready)
         if (DBufLength(&(cli_recvQ(cptr))) < 510)
           SetFlag(cptr, FLAG_NONL);
         else
+        {
+          /* More than 512 bytes in the line - drop the input and yell
+           * at the client.
+           */
           DBufClear(&(cli_recvQ(cptr)));
+          send_reply(cptr, ERR_INPUTTOOLONG);
+        }
       }
       else if (client_dopacket(cptr, dolen) == CPTR_KILLED)
         return CPTR_KILLED;