diff options
| author | Alexander Barton <alex@barton.de> | 2005-01-19 23:33:53 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2005-01-19 23:33:53 +0000 |
| commit | a40a026d15dade55b0017979b180998b5aa6d54a (patch) | |
| tree | 5b77affdc7768605c9133367bfcced1fb47ec866 /src | |
| parent | 6c5f4beb53d5e37fefe017cf28c513c44cfda1af (diff) | |
| download | ngircd-a40a026d15dade55b0017979b180998b5aa6d54a.tar.gz ngircd-a40a026d15dade55b0017979b180998b5aa6d54a.zip | |
Fixed detection of IRC lines which are too long to send. Detected by
Florian Westphal, <westphal@foo.fh-furtwangen.de>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/conn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index aad61494..ba874f8a 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 <assert.h> @@ -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 ); |