This repository has been archived by the owner. It is now read-only.
Please sign in to comment.
buffer, crypto: fix buffer decoding
Before this commit, DecodeWrite() mistakenly tried to convert buffers to UTF-8 strings which: a) produced invalid character sequences when the buffer contained octets > 127, and b) lead to spurious test failures because DecodeWrite() wrote less bytes than DecodeBytes() said it would, with the remainder either containing zeros or garbage Fix that by simply copying the buffer's data to the target buffer when the encoding is BINARY or by converting the buffer to a binary string when it's UTF8 or ASCII. Fixes #3651, #3866.
- Loading branch information