* PHP-7.2:
Fix event log handling in startup phase
Fix bug #76488 Memory leak when fetching a BLOB field
closelog();
PW32G(log_source) = RegisterEventSource(NULL, "PHP-" PHP_VERSION);
- spprintf(&PW32G(log_header), 0, (logopt & LOG_PID) ? "%s[%d]" : "%s", ident, getpid());
+ header_len = strlen(ident) + 2 + 11;
+ PW32G(log_header) = malloc(header_len*sizeof(char));
+ sprintf_s(PW32G(log_header), header_len, (logopt & LOG_PID) ? "%s[%d]" : "%s", ident, getpid());
}
-
/*
* Local variables:
* tab-width: 4