Re: [Nagios-devel] Bugfix in reset_variables (base/utils.c)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Bugfix in reset_variables (base/utils.c)

Post by Guest »

Thanks - patch will be in CVS later today.


On 30 Jan 2005 at 23:10, Dirk Porezag wrote:

> While trying to get nagios 2.0 (CVS current) working on
> Solaris-sparc-2.8, I noticed that the children which are forked to do
> the actual checks die in putenv() called by set_macro_environment_var.
> This error results from an incorrect array initialization in
> reset_variables which happens much earlier. Classical C array loop
> index bug. Enclosed the fix:
>
> *** base/utils.c Sun Jan 30 22:40:05 2005
> --- base/utils.c.orig Sun Jan 30 22:37:53 2005
> ***************
> *** 5245,5251 ****
>
> date_format=3DDATE_FORMAT_US;
>
> ! for(x=3D0;x macro_x[x]=3DNULL;
>
> for(x=3D0;x --- 5245,5251 ----
>
> date_format=3DDATE_FORMAT_US;
>
> ! for(x=3D0;x macro_x[x]=3DNULL;
>
> for(x=3D0;x
>
> Hope this helps,
> Dirk
>
> Mit freundlichen Gr=FC=DFen - Kind regards
>
> -------------------------------------------------------------------
> matrix technology AG Dr. Dirk Porezag Senior Consultant - Manager
> Shared Service Center Landsberger Str. 400-402, D-81241 M=FCnchen Tel:
> +49 - (0)89 - 589395-0 Fax: +49 - (0)89 - 589395-11 Web:
> www.matrix.ag E-mail: [email protected]
> -------------------------------------------------------------------
> E-Mail Disclaimer Der Inhalt dieser E-Mail ist ausschlie=DFlich f=FCr de=
n
> bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene
> Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten
> Sie bitte, dass jede Form der Kenntnisnahme, Ver=F6ffentlichung,
> Vervielf=E4ltigung oder Weitergabe des Inhalts dieser E-Mail unzul=E4ssi=
g
> ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail
> in Verbindung zu setzen. The information contained in this email is
> intended solely for the addressee. Access to this email by anyone else
> is unauthorized. If you are not the intended recipient, any form of
> disclosure, reproduction, distribution or any action taken or
> refrained from in reliance on it, is prohibited and may be unlawful.
> Please notify the sender immediately.
>



Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked