rse 98/09/09 23:58:19
Modified: src CHANGES
src/main http_log.c
Log:
Fix the ap_log_error_old(), ap_log_unixerr() and ap_log_printf() functions:
First all three functions no longer fail on strings containing "%" chars and
second ap_log_printf() no longer does a double-formatting (instead it directly
passes through the message to be formatted to the real internal formatting
function).
PR: 2941
Revision Changes Path
1.1049 +6 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1048
retrieving revision 1.1049
diff -u -r1.1048 -r1.1049
--- CHANGES 1998/09/09 22:05:23 1.1048
+++ CHANGES 1998/09/10 06:58:17 1.1049
@@ -1,5 +1,11 @@
Changes with Apache 1.3.2
+ *) Fix the ap_log_error_old(), ap_log_unixerr() and ap_log_printf()
+ functions: First all three functions no longer fail on strings
containing
+ "%" chars and second ap_log_printf() no longer does a double-formatting
+ (instead it directly passes through the message to be formatted to the
+ real internal formatting function). [Ralf S. Engelschall] PR#2941
+
*) Allow "Include" directives anywhere in the server config
files (but not .htaccess files). [Ken Coar] PR#2727
1.65 +3 -5 apache-1.3/src/main/http_log.c
Index: http_log.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- http_log.c 1998/08/10 16:17:54 1.64
+++ http_log.c 1998/09/10 06:58:19 1.65
@@ -460,23 +460,21 @@
API_EXPORT(void) ap_log_error_old (const char *err, server_rec *s)
{
- ap_log_error(APLOG_MARK, APLOG_ERR, s, err);
+ ap_log_error(APLOG_MARK, APLOG_ERR, s, "%s", err);
}
API_EXPORT(void) ap_log_unixerr (const char *routine, const char *file,
const char *msg, server_rec *s)
{
- ap_log_error(file, 0, APLOG_ERR, s, msg);
+ ap_log_error(file, 0, APLOG_ERR, s, "%s", msg);
}
API_EXPORT(void) ap_log_printf (const server_rec *s, const char *fmt, ...)
{
- char buf[MAX_STRING_LEN];
va_list args;
va_start(args, fmt);
- ap_vsnprintf(buf, sizeof(buf), fmt, args);
- ap_log_error(APLOG_MARK, APLOG_ERR, s, buf);
+ log_error_core(APLOG_MARK, APLOG_ERR, s, NULL, fmt, args);
va_end(args);
}