v4.x: src: make sure Utf8Value always zero-terminates
Checklist
-
tests and code linting passes -
the commit message follows commit guidelines
Affected core subsystem(s)
src
Description of change
Make sure dereferencing a Utf8Value
instance always returns a zero-terminated string, even if the conversion to string failed.
The corresponding bugfix in the master branch happened in 44a40325 (https://github.com/nodejs/node/pull/6357).