njs_string_prop_t string;
static char hex2char[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
(void) njs_string_prop(&string, value);
utf8 = (string.length != 0 && string.length != string.size);
size = njs_max(string.size + 2, 7);
- dst = njs_chb_reserve(chain, string.size + 2);
+ dst = njs_chb_reserve(chain, size);
if (njs_slow_path(dst == NULL)) {
return;
}
njs_str("\"\\n\\t\\r\\\"\\f\\b\"") },
{ njs_str("JSON.stringify('\x00\x01\x02\x1f')"),
- njs_str("\"\\u0000\\u0001\\u0002\\u001F\"") },
+ njs_str("\"\\u0000\\u0001\\u0002\\u001f\"") },
{ njs_str("JSON.stringify('abc\x00')"),
njs_str("\"abc\\u0000\"") },