aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util_format.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-04-10 12:08:31 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-10 12:08:31 -0400
commitf5258045c4cab07eea443563cac7608d5d3be5ab (patch)
tree4788686456c11dcccc3bd6533d47c697dd381984 /src/test/test_util_format.c
parentaebd72a2f07dbbc102c58639b399451342c4e3ac (diff)
downloadtor-f5258045c4cab07eea443563cac7608d5d3be5ab.tar.gz
tor-f5258045c4cab07eea443563cac7608d5d3be5ab.zip
Fix some no-longer-reasonable unit tests for base64_decode()
These tests tried to use ridiculously large buffer sizes to check the sanity-checking in the code; but since the sanity-checking changed, these need to change too.
Diffstat (limited to 'src/test/test_util_format.c')
-rw-r--r--src/test/test_util_format.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/test_util_format.c b/src/test/test_util_format.c
index dd52e4b7ab..ea0a86499f 100644
--- a/src/test/test_util_format.c
+++ b/src/test/test_util_format.c
@@ -202,13 +202,10 @@ test_util_format_base64_decode(void *ignored)
src[i] = (char)i;
}
- res = base64_decode(dst, 1, src, SIZE_T_CEILING);
+ res = base64_decode(dst, 1, src, 100);
tt_int_op(res, OP_EQ, -1);
- res = base64_decode(dst, SIZE_T_CEILING+1, src, 10);
- tt_int_op(res, OP_EQ, -1);
-
- res = base64_decode(dst, 1, real_src, SIZE_MAX/3+1);
+ res = base64_decode(dst, 1, real_src, 10);
tt_int_op(res, OP_EQ, -1);
const char *s = "T3BhIG11bmRv";