[openssh-commits] [openssh] 01/01: upstream: Cast lifetime to u_long for comparison to prevent unsigned

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Mar 17 09:48:53 AEDT 2020


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

dtucker pushed a commit to branch master
in repository openssh.

commit d8ac9af645f5519ac5211e9e1e4dc1ed00e9cced
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Mon Mar 16 02:17:02 2020 +0000

    upstream: Cast lifetime to u_long for comparison to prevent unsigned
    
    comparison warning on 32bit arches.  Spotted by deraadt, ok djm.
    
    OpenBSD-Commit-ID: 7a75b2540bff5ab4fa00b4d595db1df13bb0515a
---
 ssh-add.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ssh-add.c b/ssh-add.c
index c7bb02cb..a40198ab 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.154 2020/02/26 13:40:09 jsg Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.155 2020/03/16 02:17:02 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -718,7 +718,7 @@ main(int argc, char **argv)
 			break;
 		case 't':
 			if ((lifetime = convtime(optarg)) == -1 ||
-			    lifetime < 0 || lifetime > UINT32_MAX) {
+			    lifetime < 0 || (u_long)lifetime > UINT32_MAX) {
 				fprintf(stderr, "Invalid lifetime\n");
 				ret = 1;
 				goto done;

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


More information about the openssh-commits mailing list