This style of appending strings is error prone and hard to maintain. Try the following style instead
```
u_char *curr = ret;
cur = ngx_cpystrn(cur, input_string , input_string_length);
```