Fixed heap-use-after-free in JSON.parse().

This correctly fixes the issues addressed in 1405:9beb9ea093b5.
The initial fix wrongly assumed that the "value" pointer is still valid when
njs_is_fast_array(&state->value) is true and the pointer can be used for
the fast path.  This is not the case when the array object is resized.

Moreover, the fast path branch may be completely eliminated because
JSON.parse() with the replacer function is relatively slow by itself.

This closes #323, #324, #325 issues on GitHub.
2 files changed
tree: cff6d3d8f99b16a1a68e350503802d52f3ca6744
  1. .hgtags
  2. CHANGES
  3. LICENSE
  4. README
  5. auto/
  6. configure
  7. nginx/
  8. src/
  9. test/
  10. utils/