buffer: do not affect memory after target for utf16 write
Do not write one character too much before shifting the whole result to the left when using UTF16-LE, possibly overwriting already-used memory while doing so. Fixes: https://github.com/nodejs/node/issues/26422 PR-URL: https://github.com/nodejs/node/pull/26432 Fixes: https://github.com/nodejs/node/issues/26422 Reviewed-By:Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com>
parent
ceb73e71
Please register or sign in to comment