blob: 9ff9d70025905cfb3c684600cea5f86b1ecd0a6d [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001From 97f0b7b25474fab25f5757f7c50a77e20be5d05b Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= <valtri@civ.zcu.cz>
3Date: Mon, 7 Sep 2015 15:00:48 +0200
4Subject: [PATCH] Use the API properly in the example (format security error
5 fixed).
6
7---
8 examples/helloworld1/mylog.h | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/examples/helloworld1/mylog.h b/examples/helloworld1/mylog.h
12index 280f3dc..57e5369 100644
13--- a/examples/helloworld1/mylog.h
14+++ b/examples/helloworld1/mylog.h
15@@ -39,7 +39,7 @@ static LOG4C_INLINE int mylog_fini(){
16
17 static LOG4C_INLINE void mylog_msg(char *catName,int a_priority, char *msg){
18 #ifndef WITHOUT_LOG4C
19- log4c_category_log(log4c_category_get(catName), a_priority, msg);
20+ log4c_category_log(log4c_category_get(catName), a_priority, "%s", msg);
21 #else
22 printf(msg);
23 #endif
24--
252.12.0
26