summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrob <rob@openbsd.org>2019-05-12 20:19:37 +0000
committerrob <rob@openbsd.org>2019-05-12 20:19:37 +0000
commit5175af87917821a0e4fef0219069d02122a0c193 (patch)
tree559fffe7c6cb53270b814fb8d64d94b283b3d70a
parentEnforce smallest number of contents octets for int (and enum). (diff)
downloadwireguard-openbsd-5175af87917821a0e4fef0219069d02122a0c193.tar.xz
wireguard-openbsd-5175af87917821a0e4fef0219069d02122a0c193.zip
Test mandatory use of minimal contents octets for int and enum.
-rw-r--r--regress/lib/libutil/ber/ber_test.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/regress/lib/libutil/ber/ber_test.c b/regress/lib/libutil/ber/ber_test.c
index e91833a6c81..4513498ab68 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.11 2019/05/10 13:28:40 rob Exp $
+/* $OpenBSD: ber_test.c,v 1.12 2019/05/12 20:19:37 rob Exp $
*/
/*
* Copyright (c) Rob Pierce <rob@openbsd.org>
@@ -99,6 +99,15 @@ struct test_vector test_vectors[] = {
},
},
{
+ FAIL,
+ 0,
+ "enforce smallest number of contents octets (expected failure)",
+ 4,
+ {
+ 0x02, 0x02, 0x00, 0x01
+ },
+ },
+ {
SUCCEED,
1,
"bit string",