[asterisk-commits] mogorman: branch anthonyl/escape-filter2 r47486 - /team/anthonyl/escape-filte...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 10 17:03:38 MST 2006


Author: mogorman
Date: Fri Nov 10 18:03:38 2006
New Revision: 47486

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47486
Log:
oops wrong way

Modified:
    team/anthonyl/escape-filter2/main/logger.c

Modified: team/anthonyl/escape-filter2/main/logger.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/escape-filter2/main/logger.c?view=diff&rev=47486&r1=47485&r2=47486
==============================================================================
--- team/anthonyl/escape-filter2/main/logger.c (original)
+++ team/anthonyl/escape-filter2/main/logger.c Fri Nov 10 18:03:38 2006
@@ -680,10 +680,10 @@
 {
 	struct logchannel *chan;
 	struct ast_dynamic_str *buf;
-       	time_t t;
+	time_t t;
 	struct tm tm;
 	char date[256];
-	
+
 	va_list ap;
 
 	if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE)))
@@ -702,7 +702,6 @@
 			va_end(ap);
 			if (res != AST_DYNSTR_BUILD_FAILED)
 				fputs(buf->str, stdout);
-			
 		}
 		return;
 	}
@@ -850,7 +849,7 @@
 	struct ast_dynamic_str *buf;
 	int res;
 	va_list ap;
-	
+
 	if (ast_opt_timestamp) {
 		time_t t;
 		struct tm tm;
@@ -874,6 +873,9 @@
 
 	if (res == AST_DYNSTR_BUILD_FAILED)
 		return;
+	
+	/* filter out possibly hazardous escape sequences */
+	term_filter_escapes(buf->str);
 
 	AST_LIST_LOCK(&verbosers);
 	AST_LIST_TRAVERSE(&verbosers, v, list)



More information about the asterisk-commits mailing list