]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Remove no-op (int) > INT_MAX checks
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 10 Mar 2023 02:24:56 +0000 (02:24 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 10 Mar 2023 02:45:00 +0000 (13:45 +1100)
since they can never be true. From Coverity CID 405031, ok djm@

OpenBSD-Commit-ID: 9df3783b181e056595e2bb9edf7ed41d61cf8e84

readconf.c

index a51baae4016e886cd96629565d4e6edaee77407a..6ded2313df52df7b470bab928f04cde78119dc62 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.374 2023/03/09 21:06:24 jcs Exp $ */
+/* $OpenBSD: readconf.c,v 1.375 2023/03/10 02:24:56 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2130,15 +2130,13 @@ parse_pubkey_algos:
                value2 = 0; /* unlimited lifespan by default */
                if (value == 3 && arg2 != NULL) {
                        /* allow "AddKeysToAgent confirm 5m" */
-                       if ((value2 = convtime(arg2)) == -1 ||
-                           value2 > INT_MAX) {
+                       if ((value2 = convtime(arg2)) == -1) {
                                error("%s line %d: invalid time value.",
                                    filename, linenum);
                                goto out;
                        }
                } else if (value == -1 && arg2 == NULL) {
-                       if ((value2 = convtime(arg)) == -1 ||
-                           value2 > INT_MAX) {
+                       if ((value2 = convtime(arg)) == -1) {
                                error("%s line %d: unsupported option",
                                    filename, linenum);
                                goto out;