aboutsummaryrefslogtreecommitdiff
path: root/regress/unittests/conversion
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2021-02-14 21:00:25 +0000
committerEd Maste <emaste@FreeBSD.org>2021-02-14 21:00:25 +0000
commit0194e6d04277a638afac6c4a664d3bc6a0d944eb (patch)
treee97a6dcafc6763aea7c804e4e113c2750cb1400d /regress/unittests/conversion
parentf02e39982452024dafcf0ea6e536ebff586ffce4 (diff)
Vendor import of OpenSSH 8.1p1vendor/openssh/8.1p1
Diffstat (limited to 'regress/unittests/conversion')
-rw-r--r--regress/unittests/conversion/tests.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regress/unittests/conversion/tests.c b/regress/unittests/conversion/tests.c
index 6dd77ef42548..ae1154d429df 100644
--- a/regress/unittests/conversion/tests.c
+++ b/regress/unittests/conversion/tests.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tests.c,v 1.1 2017/03/14 01:20:29 dtucker Exp $ */
+/* $OpenBSD: tests.c,v 1.2 2019/06/14 04:03:48 djm Exp $ */
/*
* Regress test for conversions
*
@@ -40,6 +40,8 @@ tests(void)
ASSERT_LONG_EQ(convtime("-9d"), -1);
/* overflow */
+ snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX);
+ ASSERT_LONG_EQ(convtime(buf), -1);
snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX + 1);
ASSERT_LONG_EQ(convtime(buf), -1);