From: Igor Sysoev Date: Wed, 31 Aug 2016 14:51:54 +0000 (+0300) Subject: A fix in decodeURI() and decodeURIComponent() functions. X-Git-Tag: 0.1.2~7 X-Git-Url: http://git.kaiwu.me/%7B@url%7D?a=commitdiff_plain;h=bd1ad4d1c4c9fa070121dda8dcee17c61810f154;p=njs.git A fix in decodeURI() and decodeURIComponent() functions. --- diff --git a/njs/njs_string.c b/njs/njs_string.c index 3b90e0fb..5a0d5504 100644 --- a/njs/njs_string.c +++ b/njs/njs_string.c @@ -2372,6 +2372,7 @@ njs_string_decode(njs_vm_t *vm, njs_value_t *value, const uint32_t *reserve) byte = (d0 << 4) + d1; if ((reserve[byte >> 5] & ((uint32_t) 1 << (byte & 0x1f))) == 0) { + size -= 2; n += 2; } }