[Nagiosplug-devel] [ nagiosplug-Patches-1690697 ] check_mysql gets segmentation fault when -H is omitted

SourceForge.net noreply at sourceforge.net
Thu Mar 29 16:36:31 CEST 2007


Patches item #1690697, was opened at 2007-03-29 16:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1690697&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Felix Frank (illtiz)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_mysql gets segmentation fault when -H is omitted

Initial Comment:
I will paste the most simple patch i could think of. It seem valid to mem,
judging from the way process_arguments handles db_host.

*** check_mysql.c.orig Thu Mar 29 16:16:35 2007
--- check_mysql.c Thu Mar 29 16:20:27 2007
***************
*** 52,58 ****
#include <errmsg.h>

char *db_user = NULL;
! char *db_host = NULL;
char *db_pass = NULL;
char *db = NULL;
unsigned int db_port = MYSQL_PORT;
--- 52,58 ----
#include <errmsg.h>

char *db_user = NULL;
! char *db_host = "";
char *db_pass = NULL;
char *db = NULL;
unsigned int db_port = MYSQL_PORT;


Hope this makes sense.

Best regards,
Felix

PS.sorry for posting this as a bug at first

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

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




More information about the Devel mailing list