From 6155bf1ed2b30357989aea4e82b8c1120ea62770 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 1 Nov 2011 14:20:43 +0000 Subject: [PATCH] Merging r4210: Fixed utf8 decode (ticket #25). Patch by Alexey Kuts. --- src/core/ngx_string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index 8f29e9070..29f8e0d67 100644 --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -1211,19 +1211,19 @@ ngx_utf8_decode(u_char **p, size_t n) u = **p; - if (u > 0xf0) { + if (u >= 0xf0) { u &= 0x07; valid = 0xffff; len = 3; - } else if (u > 0xe0) { + } else if (u >= 0xe0) { u &= 0x0f; valid = 0x7ff; len = 2; - } else if (u > 0xc0) { + } else if (u >= 0xc2) { u &= 0x1f; valid = 0x7f;