mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix #78212: Segfault in built-in webserver
Since syslog's ident and facility parameters have been added to config[1], vsyslog() segfaults on Windows, if openlog() has not been called before. We bring back the removed lines to fix this. [1] <http://git.php.net/?p=php-src.git;a=commit;h=2475337bd8a0fad0dac03db3f5e7e9d331d53653>
This commit is contained in:
parent
e7a83ec8df
commit
fa65f5ecf5
2 changed files with 5 additions and 0 deletions
1
NEWS
1
NEWS
|
@ -4,6 +4,7 @@ PHP NEWS
|
||||||
|
|
||||||
- Core:
|
- Core:
|
||||||
. Added syslog.filter=raw option. (Erik Lundin)
|
. Added syslog.filter=raw option. (Erik Lundin)
|
||||||
|
. Fixed bug #78212 (Segfault in built-in webserver). (cmb)
|
||||||
|
|
||||||
- Date:
|
- Date:
|
||||||
. Fixed #69044 (discrepency between time and microtime). (krakjoe)
|
. Fixed #69044 (discrepency between time and microtime). (krakjoe)
|
||||||
|
|
|
@ -95,6 +95,10 @@ void vsyslog(int priority, const char *message, va_list args)
|
||||||
DWORD evid;
|
DWORD evid;
|
||||||
wchar_t *strsw[2];
|
wchar_t *strsw[2];
|
||||||
|
|
||||||
|
/* default event source */
|
||||||
|
if (INVALID_HANDLE_VALUE == PW32G(log_source))
|
||||||
|
openlog("php", LOG_PID, LOG_SYSLOG);
|
||||||
|
|
||||||
switch (priority) { /* translate UNIX type into NT type */
|
switch (priority) { /* translate UNIX type into NT type */
|
||||||
case LOG_ALERT:
|
case LOG_ALERT:
|
||||||
etype = EVENTLOG_ERROR_TYPE;
|
etype = EVENTLOG_ERROR_TYPE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue