libmacaroons
libmacaroons copied to clipboard
Provide libsodium with the correct buffer size.
bin2hex in libsodium appends a null-character to the output array, meaning the hex array must be 2 * (sizeof bin array) + 1 characters long.
Within libmacaroons, that appears to be the actual buffer size -- but we were passing this incorrectly to libsodium. In newer versions of libsodium, this triggers an internal assert.