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