[openssh-commits] [openssh] 02/05: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Mar 14 14:20:02 AEDT 2017


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

dtucker pushed a commit to branch master
in repository openssh.

commit c6774d21185220c0ba11e8fd204bf0ad1a432071
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Tue Mar 14 00:55:37 2017 +0000

    upstream commit
    
    Fix convtime() overflow test on boundary condition,
    spotted by & ok djm.
    
    Upstream-ID: 51f14c507ea87a3022e63f574100613ab2ba5708
---
 misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc.c b/misc.c
index 08fcb38..cfd3272 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.108 2017/03/14 00:25:03 dtucker Exp $ */
+/* $OpenBSD: misc.c,v 1.109 2017/03/14 00:55:37 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2005,2006 Damien Miller.  All rights reserved.
@@ -350,10 +350,10 @@ convtime(const char *s)
 		default:
 			return -1;
 		}
-		if (secs > LONG_MAX / multiplier)
+		if (secs >= LONG_MAX / multiplier)
 			return -1;
 		secs *= multiplier;
-		if  (total > LONG_MAX - secs)
+		if  (total >= LONG_MAX - secs)
 			return -1;
 		total += secs;
 		if (total < 0)

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


More information about the openssh-commits mailing list