ngx_escape_json: fixes missing len increment for non escapable json chars when dst NULL

Paulo Pacheco fooinha at gmail.com
Sat Apr 1 15:50:35 UTC 2017


# HG changeset patch
# User Paulo Pacheco <fooinha at gmail.com>
# Date 1491061541 0
#      Sat Apr 01 15:45:41 2017 +0000
# Node ID bc97af7bf9eb3def877f5ebaecf4fd8a277108d0
# Parent  28dc369899ea77b03fab44d8878b273d28f06437
ngx_string: fixes len increment for non escapable json chars

diff -r 28dc369899ea -r bc97af7bf9eb src/core/ngx_string.c
--- a/src/core/ngx_string.c Sun Mar 26 01:25:01 2017 -0700
+++ b/src/core/ngx_string.c Sat Apr 01 15:45:41 2017 +0000
@@ -1811,6 +1811,8 @@
                 len += sizeof("\\u001F") - 2;
             }

+            len++;
+
             size--;
         }




------------------------ CUT HERE ------------------------

Obrigado | Thanx | СПС

Paulo Pacheco | Паулу Пашеку


More information about the nginx-devel mailing list