[icinga-checkins] icinga.org: icinga-core/r1.6: fix unsafe null ptr passed to debug log, segfault on solaris #2271

git at icinga.org git at icinga.org
Sat Apr 28 11:22:09 CEST 2012


Module: icinga-core
Branch: r1.6
Commit: 93cd6d8035a5f332914b2c4a0e11365e010908f9
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=93cd6d8035a5f332914b2c4a0e11365e010908f9

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Jan 16 13:40:53 2012 +0100

fix unsafe null ptr passed to debug log, segfault on solaris #2271

refs #2271

---

 module/idoutils/src/ido2db.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index 51566bf..f00a52e 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -1507,7 +1507,7 @@ int ido2db_handle_client_input(ido2db_idi *idi, char *buf) {
 	int data_type = IDO_DATA_NONE;
 	int input_type = IDO2DB_INPUT_DATA_NONE;
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_handle_client_input(instance_name=%s) start\n", idi->instance_name);
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_handle_client_input start\n");
 
 #ifdef DEBUG_IDO2DB2
 	printf("HANDLING: '%s'\n", buf);
@@ -1516,6 +1516,8 @@ int ido2db_handle_client_input(ido2db_idi *idi, char *buf) {
 	if (buf == NULL || idi == NULL)
 		return IDO_ERROR;
 
+	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_handle_client_input instance_name=%s\n", (idi->instance_name == NULL) ? "(null)" : idi->instance_name);
+
 	/* we're ignoring client data because of wrong protocol version, etc...  */
 	if (idi->ignore_client_data == IDO_TRUE)
 		return IDO_ERROR;





More information about the icinga-checkins mailing list