[Nagiosplug-devel] [ nagiosplug-Bugs-1055054 ] [PATCH] Fix segfauly in check_nwstat.c

SourceForge.net noreply at sourceforge.net
Wed Nov 24 13:13:02 CET 2004


Bugs item #1055054, was opened at 2004-10-26 20:26
Message generated for change (Comment added) made by jaymzh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1055054&group_id=29880

Category: None
Group: Release (specify)
>Status: Open
Resolution: None
Priority: 5
Submitted By: Phil Dibowitz (jaymzh)
Assigned to: Matthew Kent (mattkent)
Summary: [PATCH] Fix segfauly in check_nwstat.c

Initial Comment:
The attached patch fixes a segfault in check_nwstat.c.
If the script can't get netware version, it does:     
                                                 

    asprintf(&netware_version,"");

Which despite what one would hope, actually sets the
POINTER to NULL, per a long-standing, documented bug in
the gnu library - which they keep for backwards
compatibility, best I can tell.                       
               

Anyway, in the cases where there's nothing to copy, I
simply use a strdup which prevents the segfault. Please
apply.                                      


----------------------------------------------------------------------

>Comment By: Phil Dibowitz (jaymzh)
Date: 2004-11-24 00:24

Message:
Logged In: YES 
user_id=533101

Not until I get back -- this check_nwstat.c can't be dropped
into my current directory and rerun make, and I'm about to
head on vacation. I'll check it next wee for you.

- Phil

----------------------------------------------------------------------

Comment By: Matthew Kent (mattkent)
Date: 2004-11-23 20:34

Message:
Logged In: YES 
user_id=983566

Okay, well I've applied the patch you added, would you be
able to test? I lack a Novell server unfortunately.

----------------------------------------------------------------------

Comment By: Phil Dibowitz (jaymzh)
Date: 2004-11-22 12:01

Message:
Logged In: YES 
user_id=533101

The code in the latest CVS changes:
  asprintf(&netware_version,"");
to
  asprintf(&netware_version,"%s","");

but that still segfaults for me...

- Phil

----------------------------------------------------------------------

Comment By: Matthew Kent (mattkent)
Date: 2004-11-20 14:54

Message:
Logged In: YES 
user_id=983566

Looks like this was fixed in rev 1.9. Would you be able to
try a recent snapshot?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1055054&group_id=29880




More information about the Devel mailing list