diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-04 03:37:55 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-04 03:37:55 +0100 | 
| commit | a37e578151ccf4c34932480df9b52ebf53862bfc (patch) | |
| tree | 7655fe7bcaafe8fd3ed1ef1da2135d9eb92b7e33 | |
| parent | ed5970042daafa82eb7b500d8bed476a2b230614 (diff) | |
Fixes potential DoS attack.
| -rw-r--r-- | bitlbee.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| @@ -164,7 +164,15 @@ gboolean bitlbee_io_current_client_read( GIOChannel *source, GIOCondition condit  		irc_free( irc );  		return FALSE;  	}  -		 +	 +	/* Very naughty, go read the RFCs! >:) */ +	if( strlen( irc->readbuffer ) > 1024 ) +	{ +		log_message( LOGLVL_ERROR, "Maximum line length exceeded." ); +		irc_free( irc ); +		return FALSE; +	} +	  	return TRUE;  } | 
