ngx_pstrdup() and ngx_copy() problems
|Reported by:||Owned by:|
|Keywords:||ngx_copy, ngx_pstrdup, stings||Cc:||sem33@…|
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.
I don't know how to attach a file here, so patch could be found here: https://github.com/sem-hub/nginx/commit/4f2202ae8f17dfe086420a28e6e08d607528c53a