Bug/Array index out of bounds

Tilo Renz trenz at tagwork-one.de
Tue Jun 2 16:20:25 CEST 2009


Hi,

Hereby I report an Array index out of bounds error in nagios-3.1.0/base/utils.c:4488.

Current code is:
4485:		/* get response */
4486:		recv_len=sizeof(recv_buf);
4487:		result=my_recvall(sd,recv_buf,&recv_len,2);
4488:		recv_buf[sizeof(recv_buf)]='\x0';

I think it should be something like:
4485:		/* get response */
4486:		recv_len=sizeof(recv_buf)-1;
4487:		result=my_recvall(sd,recv_buf,&recv_len,2);
4488:		recv_buf[sizeof(recv_buf)-1]='\x0';

Regards, Joey5337



--
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

E-Mail: trenz at tagwork-one.de | Fon +49(731)28064320

tagwork<one> Technology Services GmbH
Lise-Meitner-Str. 13 | Science-Park-II | D-89081 Ulm
Fon +49(731)28064320 | Fax +49(731)28064329
Website www.tagwork-one.de | E-Mail: info at tagwork-one.de

Registergericht: Amtsgericht Ulm
Registernummer: HRB 720166 | Sitz Ulm

Geschäftsführer: Gerhard Strehle

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list