[PATCH] Segfault due to uninitialized data in xodtemplate.c
Ethan Galstad
nagios at nagios.org
Mon Dec 11 23:09:20 CET 2006
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: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
More information about the Developers
mailing list