summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrob <rob@openbsd.org>2019-06-01 19:44:47 +0000
committerrob <rob@openbsd.org>2019-06-01 19:44:47 +0000
commit7ffe596ed02ee1d3f335cd5dc93c82df8864fd24 (patch)
tree3734ae53a716fc5169d5725084aaa61c318436db
parentLimit maximum number of length octets to platform independent sizeof(int32_t). (diff)
downloadwireguard-openbsd-7ffe596ed02ee1d3f335cd5dc93c82df8864fd24.tar.xz
wireguard-openbsd-7ffe596ed02ee1d3f335cd5dc93c82df8864fd24.zip
Update regression test for a maximum sizeof(int32_t) length octets.
-rw-r--r--regress/lib/libutil/ber/ber_test.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/regress/lib/libutil/ber/ber_test.c b/regress/lib/libutil/ber/ber_test.c
index 55a02dcf588..f28296c5cc3 100644
--- a/regress/lib/libutil/ber/ber_test.c
+++ b/regress/lib/libutil/ber/ber_test.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ber_test.c,v 1.16 2019/05/31 22:34:14 rob Exp $
+/* $OpenBSD: ber_test.c,v 1.17 2019/06/01 19:44:47 rob Exp $
*/
/*
* Copyright (c) Rob Pierce <rob@openbsd.org>
@@ -273,21 +273,19 @@ struct test_vector test_vectors[] = {
{
SUCCEED,
0,
- "max long form length octets (i.e. 8 bytes)",
- 11,
+ "max long form length octets (i.e. 4 bytes)",
+ 7,
{
- 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x01, 0x01
+ 0x02, 0x84, 0x00, 0x00, 0x00, 0x01, 0x01
},
},
{
FAIL,
0,
"overflow long form length octets (expected failure)",
- 12,
+ 8,
{
- 0x02, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01
+ 0x02, 0x85, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01
},
},
{