mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Initial full pass through code to fix issues with 64-bit/mismatch sign/mismatch size printf style formatters.
Still need to look more into how we are handling time and convert to apr_time_t (or time_t) where appropriate. Still need to look into our use of 'long' as windows is LLP64 where 'long' is still 32-bit.
This commit is contained in:
@@ -92,7 +92,7 @@ int apache2_exec(modsec_rec *msr, const char *command, const char **argv, char *
|
||||
|
||||
procnew = apr_pcalloc(r->pool, sizeof(*procnew));
|
||||
if (procnew == NULL) {
|
||||
msr_log(msr, 1, "Exec: Unable to allocate %d bytes.", sizeof(*procnew));
|
||||
msr_log(msr, 1, "Exec: Unable to allocate %lu bytes.", (unsigned long)sizeof(*procnew));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -246,9 +246,9 @@ void internal_log(request_rec *r, directory_config *dcfg, modsec_rec *msr,
|
||||
|
||||
/* Construct the message. */
|
||||
apr_vsnprintf(str1, sizeof(str1), text, ap);
|
||||
apr_snprintf(str2, sizeof(str2), "[%s] [%s/sid#%lx][rid#%lx][%s][%d] %s\n",
|
||||
current_logtime(msr->mp), ap_get_server_name(r), (unsigned long)(r->server),
|
||||
(unsigned long)r, ((r->uri == NULL) ? "" : log_escape_nq(msr->mp, r->uri)),
|
||||
apr_snprintf(str2, sizeof(str2), "[%s] [%s/sid#%p][rid#%p][%s][%d] %s\n",
|
||||
current_logtime(msr->mp), ap_get_server_name(r), (r->server),
|
||||
r, ((r->uri == NULL) ? "" : log_escape_nq(msr->mp, r->uri)),
|
||||
level, str1);
|
||||
|
||||
/* Write to the debug log. */
|
||||
|
Reference in New Issue
Block a user