tls: copy the Buffer object before using
Checklist
-
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
tls
Description of change
convertNPNProtocols
uses the protocols
buffer object as it is, and
if it is modified outside of core, it might have an impact. This patch
makes a copy of the buffer object, before using it.
cc @nodejs/crypto