[openssh-commits] [openssh] 03/03: upstream: check for convtime() refusing to accept times that

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Jun 19 12:21:51 AEST 2019


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 99bcbbc77fbd5a5027031f42a5931b21b07c947e
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Jun 14 04:03:48 2019 +0000

    upstream: check for convtime() refusing to accept times that
    
    resolve to LONG_MAX Reported by Kirk Wolf bz2977; ok dtucker
    
    OpenBSD-Regress-ID: 15c9fe87be1ec241d24707006a31123d3a3117e0
---
 regress/unittests/conversion/tests.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/regress/unittests/conversion/tests.c b/regress/unittests/conversion/tests.c
index 6dd77ef4..ae1154d4 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);
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list