]> git.pld-linux.org Git - packages/apache.git/blob - apache-CAN-2003-0020.patch
- updated from mod_ssl 2.8.17-1.3.31
[packages/apache.git] / apache-CAN-2003-0020.patch
1 From RedHat's errata for 1.3.27
2 --- src/main/http_log.c.escape  2003-02-14 10:57:45.000000000 +0000
3 +++ src/main/http_log.c 2003-02-14 11:17:30.000000000 +0000
4 @@ -251,6 +251,17 @@
5      }
6  }
7  
8 +/* Clean 'str' of non-printable characters. */
9 +static void sanitize(char *str, size_t len)
10 +{
11 +    while (len--) {
12 +        /* iscntrl implies !isprint; redundant but paranoid. */
13 +        if (!isprint(*str) || iscntrl(*str))
14 +            *str = '!';
15 +        str++;
16 +    }
17 +}    
18 +
19  API_EXPORT(void) ap_open_logs(server_rec *s_main, pool *p)
20  {
21      server_rec *virt, *q;
22 @@ -459,6 +470,9 @@
23  
24      len += ap_vsnprintf(errstr + len, sizeof(errstr) - len, fmt, args);
25  
26 +    /* clean of non-printable characters. */
27 +    sanitize(errstr, len);
28 +
29      /* NULL if we are logging to syslog */
30      if (logf) {
31         fputs(errstr, logf);
This page took 0.023949 seconds and 3 git commands to generate.