[asterisk-commits] file: trunk r109396 - in /trunk/main: logger.c manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 18 10:13:07 CDT 2008


Author: file
Date: Tue Mar 18 10:13:07 2008
New Revision: 109396

URL: http://svn.digium.com/view/asterisk?view=rev&rev=109396
Log:
Make sure values are interpreted as character strings and not format strings.
(AST-2008-004)

Modified:
    trunk/main/logger.c
    trunk/main/manager.c

Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?view=diff&rev=109396&r1=109395&r2=109396
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Tue Mar 18 10:13:07 2008
@@ -1145,7 +1145,7 @@
 
 	strcpy(logmsg->str, buf->str);
 
-	ast_log(LOG_VERBOSE, logmsg->str);
+	ast_log(LOG_VERBOSE, "%s", logmsg->str);
 
 	/* Set type */
 	logmsg->type = LOGMSG_VERBOSE;

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=109396&r1=109395&r2=109396
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Mar 18 10:13:07 2008
@@ -2051,7 +2051,7 @@
 			term_strip(final_buf, buf, l);
 			final_buf[l] = '\0';
 		}
-		astman_append(s, S_OR(final_buf, buf));
+		astman_append(s, "%s", S_OR(final_buf, buf));
 		ast_free(buf);
 	}
 	close(fd);




More information about the asterisk-commits mailing list