Fix CID 409: check return value of base64_encode in tests

This commit is contained in:
Nick Mathewson 2009-10-26 21:52:35 -04:00
parent a457cd91fa
commit cec698d29e

View File

@ -455,6 +455,7 @@ test_crypto_formats(void)
strlcat(data1, " 2nd string that contains 35 chars.", 1024);
i = base64_encode(data2, 1024, data1, 71);
test_assert(i >= 0);
j = base64_decode(data3, 1024, data2, i);
test_eq(j, 71);
test_streq(data3, data1);