Hello! On Tue, Dec 22, 2015 at 05:21:26PM +0300, Sergey Matveychuk wrote:
> Hi. > > * It looks like strings are supposed to finish with '\0' char to be > compatible with C strings. So ngx_pstrdup() must allocate and copy len+1, > not just len. > > * ngx_copy() returns different values for different preprocessor conditions. > > PS. I have no idea how trac.nginx.org works. I tried to fill a ticket, but > it just lost. Trac works fine, and I've just replied to you in the ticket. Here is a copy of the response: No, your assumptions are wrong. Strings in nginx are not expected to be null-terminated in general. The ngx_pstrdup() function is expected to duplicate the string passed, exactly, and this is what it currently does. The change to ngx_copy() is also wrong, you've missed dst++ in the loop. Please also see http://nginx.org/en/docs/contributing_changes.html. -- Maxim Dounin http://nginx.org/ _______________________________________________ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel
