On 24 Apr 2014, at 8:34 AM, Christophe JAILLET <christophe.jail...@wanadoo.fr> 
wrote:

> the comment is wrong.
> 
> 'ap_sub_req_lookup_dirent' uses the fact that 'rnew->uri' has some extra 
> space after the NUL.
> 'rnew->uri' is allocated via 'ap_escape_uri' which is defined as:
> 
>   #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
> 
> So, what matters here is the case in 'ap_os_escape_path' where partial *is* 
> set.
> 
> However, I have commited r1589599 in order to update the comment and to 
> allocate one extra byte to be safe, even if not needed in this particular 
> case.

Soon this will get replaced by the apr_escape API, which will allocate the 
precise amount of space for each buffer. We must make sure that code is relying 
on side effects of the original code.

The apr_escape API will allow you to ask for the required amount of space, 
which you can then manipulate before allocating the space, we must just be 
clear should we need to do this.

Regards,
Graham
--

Reply via email to