Re: [Nagios-devel] [PATCH] Segfault due to uninitialized data in

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] [PATCH] Segfault due to uninitialized data in

Post by Guest »

Thanks! Will be in CVS shortly.

Jason Hoos wrote:
> Attached is a patch that fixes some uninitialized service dependency
> fields in the xodtemplate_duplicate_servicedependency function in
> xodtemplate.c. This bug was triggered by a home-brew patch we had for
> doing same-host service dependencies (which I've since decided to
> discard in favor of William Leibzon's similar patch). I haven't been
> able to come up with a configuration that triggers the segfault in a
> virgin build of Nagios, but I figured I'd submit the patch here anyways
> for consideration.
>
> This patch applies to Nagios 2.5 and 2.6.
>
> Jason Hoos
>
>
> ------------------------------------------------------------------------
>
> *** nagios-2.5/xdata/xodtemplate.c.orig2 Tue Oct 17 22:53:18 2006
> --- nagios-2.5/xdata/xodtemplate.c Tue Oct 17 22:56:05 2006
> ***************
> *** 5069,5074 ****
> --- 5069,5076 ----
> new_servicedependency->dependent_hostgroup_name=NULL;
> new_servicedependency->host_name=NULL;
> new_servicedependency->dependent_host_name=NULL;
> + new_servicedependency->service_description=NULL;
> + new_servicedependency->dependent_service_description=NULL;
>
> new_servicedependency->has_been_resolved=temp_servicedependency->has_been_resolved;
> new_servicedependency->register_object=temp_servicedependency->register_object;
>

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