summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/lib/b64_decode-test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lib/b64_decode-test.c b/tests/lib/b64_decode-test.c
index 189ce96237..8560eb2ccc 100644
--- a/tests/lib/b64_decode-test.c
+++ b/tests/lib/b64_decode-test.c
@@ -35,6 +35,9 @@ static void test_b64_decode(void **state)
res = b64_decode((uint8_t *)messages[i].enc, strlen(messages[i].enc), decoded);
assert_int_equal(res, (strlen(messages[i].dec)));
+
+ decoded[res] = 0x00;
+
assert_string_equal((const char *)decoded, messages[i].dec);
free(decoded);