From: Nick Mathewson Date: Tue, 27 Oct 2009 01:52:35 +0000 (-0400) Subject: Fix CID 409: check return value of base64_encode in tests X-Git-Tag: tor-0.2.2.6-alpha~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cec698d29ed51ed219f907e12538e6945e535e4a;p=thirdparty%2Ftor.git Fix CID 409: check return value of base64_encode in tests --- diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c index 670fd0048f..656c3c94fc 100644 --- a/src/test/test_crypto.c +++ b/src/test/test_crypto.c @@ -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);