]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix CID 409: check return value of base64_encode in tests
authorNick Mathewson <nickm@torproject.org>
Tue, 27 Oct 2009 01:52:35 +0000 (21:52 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 27 Oct 2009 02:40:41 +0000 (22:40 -0400)
src/test/test_crypto.c

index 670fd0048f6aced605b630cb3762b1f27d3f7688..656c3c94fc0ebe2a184e4d178800fc3c9fbaa5a9 100644 (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);