You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Endianness check/bit shifting needed for UCS-2 write operation in versions 4.x+ #3409
The UCS-2 write operation in versions 4.x of Node does not check the endianness of the system when writing strings to memory, instead assuming little endianness for all operations. As a result, running a UCS-2 write operation on a big endian machine will result in a read operation conducted on this string returning a different string than the one originally written.
An endianness check was included in v0.12, but later removed for versions 4.x. To correct this issue, it is necessary to re-introduce this endianness check to the write operation and flip the bits of the string if the system architecture is big-endian.
Activity
evanlucas commentedon Feb 22, 2016
Closing as this has landed in master. Thanks!