[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [tor/master] Fix CID 409: check return value of base64_encode in tests



Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon, 26 Oct 2009 21:52:35 -0400
Subject: Fix CID 409: check return value of base64_encode in tests
Commit: cec698d29ed51ed219f907e12538e6945e535e4a

---
 src/test/test_crypto.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 670fd00..656c3c9 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);
-- 
1.5.6.5