1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-05-14 05:04:09 +00:00

IRC_PART could reference invalid memory.

This commit is contained in:
Florian Westphal 2008-01-07 11:41:43 +00:00
parent d64ab2a36d
commit 26c65a11cf
2 changed files with 9 additions and 3 deletions

View File

@ -9,6 +9,10 @@
-- ChangeLog --
ngIRCd 0.10.4 (2008-01-07)
- SECURITY: IRC_PART could reference invalid memory, causing
ngircd to crash.
ngIRCd 0.10.3 (2007-07-31)
@ -694,4 +698,4 @@ ngIRCd 0.0.1, 31.12.2001
--
$Id: ChangeLog,v 1.302.2.19 2007/07/31 19:33:51 alex Exp $
$Id: ChangeLog,v 1.302.2.20 2008/01/07 11:41:43 fw Exp $

View File

@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: irc-channel.c,v 1.35.2.4 2007/07/31 18:54:30 alex Exp $";
static char UNUSED id[] = "$Id: irc-channel.c,v 1.35.2.5 2008/01/07 11:41:44 fw Exp $";
#include "imp.h"
#include <assert.h>
@ -270,7 +270,9 @@ IRC_PART( CLIENT *Client, REQUEST *Req )
assert( Req != NULL );
/* Falsche Anzahl Parameter? */
if(( Req->argc > 2 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
if (Req->argc < 1 || Req->argc > 2)
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
/* Wer ist der Absender? */
if( Client_Type( Client ) == CLIENT_SERVER ) target = Client_Search( Req->prefix );