Files
gentoo/dev-libs/libmacaroons/files/libmacaroons-0.3.0-hex-encoding.patch
2026-04-30 14:37:31 +02:00

13 lines
396 B
Diff

diff --git a/port.c b/port.c
index 4fef7fa..138682a 100644
--- a/port.c
+++ b/port.c
@@ -126,7 +126,7 @@ macaroon_secretbox_open(const unsigned char* enc_key,
void
macaroon_bin2hex(const unsigned char* bin, size_t bin_sz, char* hex)
{
- void* ptr = sodium_bin2hex(hex, bin_sz * 2, bin, bin_sz);
+ void* ptr = sodium_bin2hex(hex, bin_sz * 2 + 1, bin, bin_sz);
assert(ptr == hex);
}