Welcome! Log In Create A New Profile

Advanced

[njs] Invalid Unicode code point processing has been fixed.

October 18, 2016 09:02AM
details: http://hg.nginx.org/njs/rev/59b3b4a0b535
branches:
changeset: 207:59b3b4a0b535
user: Igor Sysoev <igor@sysoev.ru>
date: Tue Oct 18 15:48:22 2016 +0300
description:
Invalid Unicode code point processing has been fixed.

diffstat:

njs/njs_parser.c | 3 +++
njs/test/njs_unit_test.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r b2a23cf748f8 -r 59b3b4a0b535 njs/njs_parser.c
--- a/njs/njs_parser.c Tue Oct 18 15:48:19 2016 +0300
+++ b/njs/njs_parser.c Tue Oct 18 15:48:22 2016 +0300
@@ -2135,6 +2135,9 @@ njs_parser_escape_string_create(njs_vm_t

if (dst != NULL) {
dst = nxt_utf8_encode(dst, (uint32_t) u);
+ if (dst == NULL) {
+ goto invalid;
+ }
}
}

diff -r b2a23cf748f8 -r 59b3b4a0b535 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Tue Oct 18 15:48:19 2016 +0300
+++ b/njs/test/njs_unit_test.c Tue Oct 18 15:48:22 2016 +0300
@@ -2660,6 +2660,9 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("'\\u{1234567}'"),
nxt_string("SyntaxError: Invalid Unicode code point \"\\u{1234567}\" in 1") },

+ { nxt_string("'\\u{a00000}'"),
+ nxt_string("SyntaxError: Invalid Unicode code point \"\\u{a00000}\" in 1") },
+
{ nxt_string("'\\x61'"),
nxt_string("a") },


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Invalid Unicode code point processing has been fixed.

Igor Sysoev 682 October 18, 2016 09:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 287
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready