On 9/7/21 2:00 PM, Yann Ylavic wrote:
> On Mon, May 25, 2020 at 7:50 AM <rpl...@apache.org> wrote:
>>
>> Author: rpluem
>> Date: Mon May 25 05:50:12 2020
>> New Revision: 1878092
>>
>> URL: http://svn.apache.org/viewvc?rev=1878092&view=rev
>> Log:
>> Fix a NULL pointer dereference
>>
>> * server/scoreboard.c (ap_increment_counts): In certain cases like certain
>> invalid requests r->method might be NULL here. r->method_number defaults
>> to M_GET and hence is M_GET in these cases.
>>
>>
>> Modified:
>> httpd/httpd/trunk/server/scoreboard.c
>>
>> Modified: httpd/httpd/trunk/server/scoreboard.c
>> URL:
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/server/scoreboard.c?rev=1878092&r1=1878091&r2=1878092&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/server/scoreboard.c (original)
>> +++ httpd/httpd/trunk/server/scoreboard.c Mon May 25 05:50:12 2020
>> @@ -381,7 +381,7 @@ AP_DECLARE(void) ap_increment_counts(ap_
>> if (pfn_ap_logio_get_last_bytes != NULL) {
>> bytes = pfn_ap_logio_get_last_bytes(r->connection);
>> }
>> - else if (r->method_number == M_GET && r->method[0] == 'H') {
>> + else if (r->method_number == M_GET && r->method && r->method[0] == 'H')
>> {
>> bytes = 0;
>> }
>> else {
>
> Sorry for the lateness..
> Maybe we could have an r->method_number == M_INVALID and r->method ==
> "" by default on failure, like with the attached patch?
Instead of the above or on top?
Regards
RĂ¼diger