Fix format string bugs with sizeof(int)!=sizeof(size_t) in mod_accesslog for SYSLOG
(assuming there are no access-log-lines > 2GB) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2285 152afb58-edef-0310-8abb-c4023f1b3aa9svn/tags/lighttpd-1.4.20
parent
24804542d2
commit
227d6f1b56
1
NEWS
1
NEWS
|
@ -53,6 +53,7 @@ NEWS
|
|||
* fixed conditional patching of ldap filter (#1564)
|
||||
* Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server)
|
||||
* fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1"
|
||||
* fixed format string bugs in mod_accesslog for SYSLOG
|
||||
|
||||
- 1.4.19 - 2008-03-10
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ FREE_FUNC(mod_accesslog_free) {
|
|||
if (s->use_syslog) {
|
||||
# ifdef HAVE_SYSLOG_H
|
||||
if (s->access_logbuffer->used > 2) {
|
||||
syslog(LOG_INFO, "%*s", s->access_logbuffer->used - 2, s->access_logbuffer->ptr);
|
||||
syslog(LOG_INFO, "%*s", (int) s->access_logbuffer->used - 2, s->access_logbuffer->ptr);
|
||||
}
|
||||
# endif
|
||||
} else if (s->log_access_fd != -1) {
|
||||
|
@ -561,7 +561,7 @@ SIGHUP_FUNC(log_access_cycle) {
|
|||
#ifdef HAVE_SYSLOG_H
|
||||
if (s->access_logbuffer->used > 2) {
|
||||
/* syslog appends a \n on its own */
|
||||
syslog(LOG_INFO, "%*s", s->access_logbuffer->used - 2, s->access_logbuffer->ptr);
|
||||
syslog(LOG_INFO, "%*s", (int) s->access_logbuffer->used - 2, s->access_logbuffer->ptr);
|
||||
}
|
||||
#endif
|
||||
} else if (s->log_access_fd != -1) {
|
||||
|
@ -859,7 +859,7 @@ REQUESTDONE_FUNC(log_access_write) {
|
|||
#ifdef HAVE_SYSLOG_H
|
||||
if (b->used > 2) {
|
||||
/* syslog appends a \n on its own */
|
||||
syslog(LOG_INFO, "%*s", b->used - 2, b->ptr);
|
||||
syslog(LOG_INFO, "%*s", (int) b->used - 2, b->ptr);
|
||||
}
|
||||
#endif
|
||||
} else if (p->conf.log_access_fd != -1) {
|
||||
|
|
Loading…
Reference in New Issue