[PATCH] ngx_pstrdup() and ngx_copy() problems

Valentin V. Bartenev vbart at nginx.com
Tue Dec 22 15:08:56 UTC 2015


On Tuesday 22 December 2015 17:57:25 Sergey Matveychuk wrote:
> Yes, I wrong with ngx_copy.
> 
> But I see ngx_string_t data is passed to С functions. Just a first 
> example I've found in ngx_open_file_wrapper():
> fd = ngx_open_file(name->data, mode, create, access);
> 
> Where ngx_open_file() is a macro for open(2).
> 
[..]

In places where a null-terminated string is expected the special care
is taken to provide such string.

But in general they are not null-terminated.

  wbr, Valentin V. Bartenev



More information about the nginx-devel mailing list