summaryrefslogtreecommitdiff
path: root/dev-libs/libmacaroons/files/libmacaroons-0.3.0-hex-encoding.patch
blob: ea870e23813ae7513b65058db44053e6af0de8a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
 }