[icinga-checkins] icinga.org: icinga-core/r1.2: classic ui: do not allow url_encode returning empty string on Solaris (Ethan Galstad, Ton Voon) #924

git at icinga.org git at icinga.org
Tue Nov 9 08:24:13 CET 2010


Module: icinga-core
Branch: r1.2
Commit: 610a605fe350d926e6c35a266c9529184e3a6298
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=610a605fe350d926e6c35a266c9529184e3a6298

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed Nov  3 09:07:44 2010 +0100

classic ui: do not allow url_encode returning empty string on Solaris (Ethan Galstad, Ton Voon) #924

fixes #924

---

 Changelog      |    1 +
 cgi/cgiutils.c |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Changelog b/Changelog
index e1b85c2..4682354 100644
--- a/Changelog
+++ b/Changelog
@@ -15,6 +15,7 @@ FIXES
 * classic ui: change servicestatus letter color to default black, not grey #946
 * classic ui: fix waste of cpu in status summary (TomTom) #933
 * classic ui: fix config.cgi start page wrong "command cxpansion" url(Alexey Dvoryanchikov) #951
+* classic ui: do not allow url_encode returning empty string on Solaris (Ethan Galstad, Ton Voon) #924 
 
 * install: fix LD_LIBRARY_PATH export on non bash in idoutils init script (Alexander Skwar) #936
 * install: add log2ido for adding archived logs onto socket/rdbms #926
diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index 1111ab8..a741853 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -1387,8 +1387,11 @@ char * url_encode(char *input){
 	static int i = 0;
 	char* str = encoded_url_string[i];
 
+	/* initialize return string */
+	strcpy(str,"");
+
 	if(input==NULL)
-		return '\x0';
+		return str;
 
 	len=(int)strlen(input);
 	output_len=(int)sizeof(encoded_url_string[0]);





More information about the icinga-checkins mailing list