repo: ngircd
action: commit
revision: 
path_from: 
revision_from: a40a026d15dade55b0017979b180998b5aa6d54a:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit a40a026d15dade55b0017979b180998b5aa6d54a
Author: Alexander Barton 
Date:   Wed Jan 19 23:33:53 2005 +0000

    Fixed detection of IRC lines which are too long to send. Detected by
    Florian Westphal, .

diff --git a/ChangeLog b/ChangeLog
index 6e24d3b626e935810c4180672d1e9c6c61afd8e4..
index ..f659b44ecbd5a9d33f0823d5f3cd0eb6e4bc94d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@

                      ngIRCd - Next Generation IRC Server

-                      (c)2001-2004 by Alexander Barton,
+                        (c)2001-2005 Alexander Barton,
                     alex@barton.de, http://www.barton.de/

                ngIRCd is free software and published under the
@@ -12,6 +12,8 @@

 ngIRCd CVSHEAD

+  - Fixed detection of IRC lines which are too long to send. Detected by
+    Florian Westphal, .
   - Fixed return values of our own implementation of strlcpy(). The code has
     been taken from rsync and they fixed it, but we didn't until today :-/
     It has only been used when the system didn't implement strlcpy by itself,
@@ -561,4 +563,4 @@ ngIRCd 0.0.1, 31.12.2001


 -- 
-$Id: ChangeLog,v 1.251 2005/01/18 09:05:37 alex Exp $
+$Id: ChangeLog,v 1.252 2005/01/19 23:33:53 alex Exp $
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index aad61494a0a62e70d2fa8679006af15735a1afee..
index ..ba874f8a71bd5f57b9b13595677494f88c6b9d80 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -16,7 +16,7 @@

 #include "portab.h"

-static char UNUSED id[] = "$Id: conn.c,v 1.142 2005/01/17 11:57:39 alex Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.143 2005/01/19 23:33:54 alex Exp $";

 #include "imp.h"
 #include 
@@ -529,7 +529,7 @@ va_dcl
 #else
 	va_start( ap );
 #endif
-	if( vsnprintf( buffer, COMMAND_LEN - 2, Format, ap ) == COMMAND_LEN - 2 )
+	if( vsnprintf( buffer, COMMAND_LEN - 2, Format, ap ) >= COMMAND_LEN - 2 )
 	{
 		Log( LOG_CRIT, "Text too long to send (connection %d)!", Idx );
 		Conn_Close( Idx, "Text too long to send!", NULL, FALSE );

-----END OF PAGE-----