Subject: | infinite recursion while processing param |
To reproduce this bug I changed
#define APREQ_DEFAULT_READ_BLOCK_SIZE (64 * 1)
in apreq.h
I made a HTML-form with enctype multipart/form-data, that had about 10 params (size of a request should be more than 64 byte).
When I tried to get two form params in mod_perl2 handler:
package TestHandler;
use Apache2::RequestUtil;
use Apache2::Request;
use Apache2::Const 'OK';
sub handler {
my $r = Apache2::RequestUtil->request();
my $q = Apache2::Request->new($r);
my $param1 = $q->param('param1');
my $param2 = $q->param('param2');
return OK;
}
1;
Apache process was killed with signal Illegal instruction (4).
The problem is in apreq_hook_find_param(), hook->next is linked to hook itself, when processing second param (param2).