Files
bongo/dev-libs/log4c/files/log4c-1.2.4-format-security.patch
T
2026-07-16 23:07:54 +02:00

14 lines
387 B
Diff

--- a/examples/helloworld1/mylog.h
+++ b/examples/helloworld1/mylog.h
@@ -39,9 +39,9 @@
static LOG4C_INLINE void mylog_msg(char *catName,int a_priority, char *msg){
#ifndef WITHOUT_LOG4C
- log4c_category_log(log4c_category_get(catName), a_priority, msg);
+ log4c_category_log(log4c_category_get(catName), a_priority, "%s", msg);
#else
- printf(msg);
+ printf("%s", msg);
#endif
}