]> TLD Linux GIT Repositories - packages/xrdp.git/blob - format-security.patch
- patches from debian
[packages/xrdp.git] / format-security.patch
1 Fix a potential security problem if the message log contained "%".
2
3 diff --git a/common/log.c b/common/log.c
4 index 7bbdfc0..4ed2adf 100644
5 --- a/common/log.c
6 +++ b/common/log.c
7 @@ -160,13 +160,13 @@ log_message(struct log_config* l_cfg, const unsigned int lvl, const char* msg, .
8    if (l_cfg->enable_syslog  && (lvl <= l_cfg->log_level))
9    {
10      /* log to syslog */
11 -    syslog(log_xrdp2syslog(lvl), buff + 20);
12 +    syslog(log_xrdp2syslog(lvl), "%s", buff + 20);
13    }
14  
15    if (lvl <= l_cfg->log_level)
16    {
17      /* log to console */
18 -    g_printf((char*)buff);
19 +    g_printf("%s", (char*)buff);
20  
21      /* log to application logfile */
22  #ifdef LOG_ENABLE_THREAD