rse 98/09/21 10:29:46
Modified: src/main http_log.c Log: I knew it: It's always best to think about a patch one hour more. After I again and again read the patch (because I wanted to make sure we don't break anything just before release), I find out: _both_ ap_snprintf and ap_psprintf are wrong in the context. Because "args" is a va_list and _CANNOT_ be used safely for ap_snprintf and therefore not for ap_psprintf, too. But (puhhhh) we have ap_vsnprintf in our libap, so use this... So, we fix two things here: 1. The logic of the if-clause 2. The string creating itself Revision Changes Path 1.68 +2 -2 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.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- http_log.c 1998/09/18 04:29:07 1.67 +++ http_log.c 1998/09/21 17:29:45 1.68 @@ -440,10 +440,10 @@ va_start(args, fmt); log_error_core(file, line, level, r->server, r, fmt, args); - if (ap_table_get(r->notes, "error-notes") != NULL) { + if (ap_table_get(r->notes, "error-notes") == NULL) { char errstr[MAX_STRING_LEN]; - ap_snprintf(errstr, sizeof(errstr), fmt, args); + ap_vsnprintf(errstr, sizeof(errstr), fmt, args); ap_table_set(r->notes, "error-notes", errstr); } va_end(args);