From: Igor Sysoev Date: Mon, 11 Jan 2010 13:39:24 +0000 (+0000) Subject: fix ngx_utf8_cpystrn(): it did not fully copy utf-8 string X-Git-Tag: release-0.8.32~2 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=d8be48a546a730eccc9c18c89be5fe15b4aedfac;p=nginx.git fix ngx_utf8_cpystrn(): it did not fully copy utf-8 string --- diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index 613ce93b8..829913483 100644 --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -1239,10 +1239,8 @@ ngx_utf8_cpystrn(u_char *dst, u_char *src, size_t n, size_t len) break; } - len--; - while (src < next) { - *++dst = *++src; + *dst++ = *src++; len--; } }