Welcome! Log In Create A New Profile

Advanced

[njs] A fix in decodeURI() and decodeURIComponent() functions.

August 31, 2016 12:30PM
details: http://hg.nginx.org/njs/rev/715b147cbfe0
branches:
changeset: 166:715b147cbfe0
user: Igor Sysoev <igor@sysoev.ru>
date: Wed Aug 31 19:28:08 2016 +0300
description:
A fix in decodeURI() and decodeURIComponent() functions.

diffstat:

njs/njs_string.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r 584114a51b51 -r 715b147cbfe0 njs/njs_string.c
--- a/njs/njs_string.c Wed Aug 31 19:18:47 2016 +0300
+++ b/njs/njs_string.c Wed Aug 31 19:28:08 2016 +0300
@@ -2317,8 +2317,8 @@ njs_string_decode(njs_vm_t *vm, njs_valu
{
int8_t d0, d1;
u_char byte, *start, *src, *dst;
- size_t n, size;
- ssize_t length;
+ size_t n;
+ ssize_t size, length;
nxt_bool_t utf8;
njs_string_prop_t string;

@@ -2358,7 +2358,7 @@ njs_string_decode(njs_vm_t *vm, njs_valu

size -= 2;

- if (size == 0) {
+ if (size <= 0) {
goto uri_error;
}


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

[njs] A fix in decodeURI() and decodeURIComponent() functions.

Igor Sysoev 983 August 31, 2016 12:30PM



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

Online Users

Guests: 149
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready