diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-08-13 11:44:50 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-08-15 16:21:45 +0300 |
commit | b115e254b32f58dea98a0f30ad1510c3223b8a1b (patch) | |
tree | adc8b48e05dcda5d728d931b8cff80e26448abe9 /src/microhttpd/test_str_base64.c | |
parent | 7d2bf243107fb53a36f345bfd933af207c2e7823 (diff) | |
download | libmicrohttpd-b115e254b32f58dea98a0f30ad1510c3223b8a1b.tar.gz libmicrohttpd-b115e254b32f58dea98a0f30ad1510c3223b8a1b.zip |
mhd_str: added function for bin to hex without zero-termination
Diffstat (limited to 'src/microhttpd/test_str_base64.c')
-rw-r--r-- | src/microhttpd/test_str_base64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/microhttpd/test_str_base64.c b/src/microhttpd/test_str_base64.c index 9daa6cb7..1821d116 100644 --- a/src/microhttpd/test_str_base64.c +++ b/src/microhttpd/test_str_base64.c | |||
@@ -86,7 +86,7 @@ expect_decoded_n (const char *const encoded, const size_t encoded_len, | |||
86 | } | 86 | } |
87 | else | 87 | else |
88 | { | 88 | { |
89 | prnt_size = MHD_bin_to_hex (buf, res_size, prnt); | 89 | prnt_size = MHD_bin_to_hex_z (buf, res_size, prnt); |
90 | mhd_assert (2 * res_size == prnt_size); | 90 | mhd_assert (2 * res_size == prnt_size); |
91 | 91 | ||
92 | fprintf (stderr, | 92 | fprintf (stderr, |
@@ -96,7 +96,7 @@ expect_decoded_n (const char *const encoded, const size_t encoded_len, | |||
96 | (int) prnt_size, prnt, (unsigned) decoded_size, | 96 | (int) prnt_size, prnt, (unsigned) decoded_size, |
97 | (unsigned) res_size); | 97 | (unsigned) res_size); |
98 | } | 98 | } |
99 | prnt_size = MHD_bin_to_hex (decoded, decoded_size, prnt); | 99 | prnt_size = MHD_bin_to_hex_z (decoded, decoded_size, prnt); |
100 | mhd_assert (2 * decoded_size == prnt_size); | 100 | mhd_assert (2 * decoded_size == prnt_size); |
101 | fprintf (stderr, | 101 | fprintf (stderr, |
102 | "\tEXPECTED: MHD_base64_to_bin_n ('%.*s', %u, ->%.*sh, %u)" | 102 | "\tEXPECTED: MHD_base64_to_bin_n ('%.*s', %u, ->%.*sh, %u)" |
@@ -620,7 +620,7 @@ expect_fail_n (const char *const encoded, const size_t encoded_len, | |||
620 | } | 620 | } |
621 | else | 621 | else |
622 | { | 622 | { |
623 | prnt_size = MHD_bin_to_hex (buf, res_size, prnt); | 623 | prnt_size = MHD_bin_to_hex_z (buf, res_size, prnt); |
624 | mhd_assert (2 * res_size == prnt_size); | 624 | mhd_assert (2 * res_size == prnt_size); |
625 | 625 | ||
626 | fprintf (stderr, | 626 | fprintf (stderr, |